ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there

前端 未结 21 1202
礼貌的吻别
礼貌的吻别 2020-11-22 14:12

I have a situation very much like the one at ImportError: DLL load failed: %1 is not a valid Win32 application, but the answer there isn\'t working for me.

My Python

21条回答
  •  情歌与酒
    2020-11-22 14:41

    If your build-system (CMake in my case) copies the file from .dll to .pyd, you will get this error if the original file wasn't actually a dll. In my case, building shared libraries got switched off, so the underlying file was actually a *.lib.

    I discovered this error by loading the pyd file in DependencyWalker and finding that it wasn't valid.

提交回复
热议问题