Numpy在64位窗口上无法使用32位Python

时间:2015-08-30 12:45:43

标签: python numpy activepython

我有一个Python 2.7.8。在Windows 10 64位上安装32位。当我尝试public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String inputName = sc.next(); String regex = "^[a-zA-Z ]*$"; // Compile this pattern. Pattern pattern = Pattern.compile(regex); // See if this String matches. Matcher m = pattern.matcher(inputName); if (m.matches()) { System.out.println("Valid Name"); } else System.out.println("Invalid Name"); } } 时,我收到以下错误:

import numpy

我已经从this page

安装了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.

1 个答案:

答案 0 :(得分:0)

来自CGohlke's page

  

二进制文件与Windows&gt; = 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包。< / p>