2015-08-30 75 views
0

我有一個Python 2.7.8。在Windows 10 64位上安裝32位。當我嘗試import numpy我得到以下錯誤:Numpy不能在64位窗口上使用32位Python

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. 

我已經安裝了numpy-1.9.2+unoptimized-cp27-none-win32.whlthis page

回答

0

CGohlke's page

The binaries are compatible with the official CPython distribution on Windows >=6.0. Chances are they don't work with custom Python distributions included with Blender, Maya, ArcGIS, OSGeo4W, ABAQUS, Cygwin, Pythonxy, Canopy, EPD, Anaconda, WinPython etc.

我的猜測是,同是也是ActivePython的真實。

我會建議無論是從here安裝官方CPython的的Windows二進制文件,或安裝從here的蟒蛇分佈,帶有numpy的,SciPy的,matplotlib和其他科學的Python包的木筏。