【问题标题】:Numpy doesn't work with 32 bit Python on 64 bit windowsNumpy 不适用于 64 位 Windows 上的 32 位 Python
【发布时间】:2015-08-30 12:45:42
【问题描述】:

我有一个 Python 2.7.8。 32 位安装在 Windows 10 64 位上。当我尝试import numpy 时,出现以下错误:

ActivePython 2.7.8.10 (ActiveState Software Inc.) based on
Python 2.7.8 (default, Jul  2 2014, 19:50:44) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Igic\AppData\Roaming\Python\Python27\site-packages\numpy\__init__.py", line 137, in <module>
    import add_newdocs
  File "C:\Users\Igic\AppData\Roaming\Python\Python27\site-packages\numpy\add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "C:\Users\Igic\AppData\Roaming\Python\Python27\site-packages\numpy\lib\__init__.py", line 4, in <module>

    from type_check import *
  File "C:\Users\Igic\AppData\Roaming\Python\Python27\site-packages\numpy\lib\type_check.py", line 8, in <module>
    import numpy.core.numeric as _nx
  File "C:\Users\Igic\AppData\Roaming\Python\Python27\site-packages\numpy\core\__init__.py", line 5, in <module>
    import multiarray
ImportError: DLL load failed: %1 is not a valid Win32 application.

我已经从this page 安装了numpy-1.9.2+unoptimized-cp27-none-win32.whl

【问题讨论】:

    标签: python numpy activepython


    【解决方案1】:

    来自CGohlke's page

    二进制文件与 Windows >=6.0 上的官方 CPython 发行版兼容。它们可能不适用于 Blender、Maya、ArcGIS、OSGeo4W、ABAQUS、Cygwin、Pythonxy、Canopy、EPD、Anaconda、WinPython 等中包含的自定义 Python 发行版。

    我的猜测是 ActivePython 也是如此。

    我建议要么从 here 安装官方 CPython Windows 二进制文件,要么从 here 安装 Anaconda 发行版,它附带 numpy、scipy、matplotlib 和大量其他科学 Python 包。

    【讨论】:

      猜你喜欢
      • 2018-01-25
      • 2013-09-11
      • 1970-01-01
      • 1970-01-01
      • 2022-01-18
      • 2011-10-21
      • 2012-10-26
      • 2011-09-02
      • 2013-01-23
      相关资源
      最近更新 更多