简体   繁体   English

Numpy不适用于64位Windows上的32位Python

[英]Numpy doesn't work with 32 bit Python on 64 bit windows

I have a Python 2.7.8. 我有一个Python 2.7.8。 32-bit installed on Windows 10 64 bit. 在Windows 10 64位上安装了32位。 When I try to import numpy I get the following error: 当我尝试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.

I have installed numpy-1.9.2+unoptimized-cp27-none-win32.whl from this page 我已经从此页面安装了numpy-1.9.2+unoptimized-cp27-none-win32.whl

From CGohlke's page : CGohlke的页面

The binaries are compatible with the official CPython distribution on Windows >=6.0. 这些二进制文件与Windows> = 6.0上的官方CPython发行版兼容。 Chances are they don't work with custom Python distributions included with Blender, Maya, ArcGIS, OSGeo4W, ABAQUS, Cygwin, Pythonxy, Canopy, EPD, Anaconda, WinPython etc. 它们可能无法与Blender,Maya,ArcGIS,OSGeo4W,ABAQUS,Cygwin,Pythonxy,Canopy,EPD,Anaconda,WinPython等包含的自定义Python发行版一起使用。

My guess is that the same is also true of ActivePython. 我的猜测是ActivePython也是如此。

I would recommend either installing the official CPython Windows binary from here , or installing the Anaconda distribution from here , which comes with numpy, scipy, matplotlib and a raft of other scientific Python packages. 我会建议无论是从安装官方的CPython的Windows二进制这里 ,或安装从蟒蛇分布在这里 ,它自带numpy的,SciPy的,matplotlib和其他科学的Python包的木筏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM