代码之家  ›  专栏  ›  技术社区  ›  Alexander McFarlane

在32位python解释器中导入64位DLL时的导入错误

  •  1
  • Alexander McFarlane  · 技术社区  · 6 年前

    在64位中导入32位代码的错误代码 python 翻译是

    ImportError: DLL load failed: %1 is not a valid Win32 application.
    

    这是否与在32位内存中导入64位代码时引发的错误相同 翻译?

    如果不是,那是什么错误?

    2 回复  |  直到 6 年前
        1
  •  1
  •   ShadowRanger    6 年前

    更新:


    关于为后代保留的应用程序与模块的原始答案,但与OP无关:


    ImportError .

    因此,只要操作系统是64位的,并且支持32位和64位进程的混合运行,32位Python在启动64位程序时就不会遇到问题;问题是在同一个进程中混合和匹配32位和64位代码;两个不相关的进程可以具有操作系统/硬件支持的任何位。

        2
  •  0
  •   Alexander McFarlane    6 年前

    以问答方式。。。在64位Windows计算机上

    Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pyfftw32
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: DLL load failed: The specified module could not be found.
    >>> import pyfftw64
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: DLL load failed: %1 is not a valid Win32 application.
    

    64位 ImportError

    我还用其他64位的 pyd先生 给出类似错误的二进制文件。