Windows 10 Pro 64位版本上的Im。
我从以下页面下载Anaconda3-2019.03-Windows-x86_64.exe:https://www.anaconda.com/distribution/
我双击该exe并按照以下步骤操作-我将其安装在系统范围内的C:\ ProgramData \ Anaconda3中。
我启动anaconda提示符。我使用conda create --name pythone37 python = 3.7创建了virtualenv。我确实安装了numpy(例如)
然后我得到:
Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
C:\Users\Alex Marshall\AppData\Roaming\Python\Python37\site-packages\numpy\.libs\libopenblas.JKAMQ5EVHIVCPXP2XZJB2RQPIN47S32M.gfortran-win32.dll
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Alex Marshall\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\Alex Marshall\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 24, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Users\Alex Marshall\.conda\envs\python37\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
似乎任何调用外部C库的程序包都会发生(我认为这就是为什么使用WinDLL的原因)。例如,numba也会发生这种情况。
使用python3.6或32位python不会发生。是什么赋予了?这在Windows 3.7 64bit上刚刚被打破吗?