当我在jupyter笔记本上尝试“导入numpy”时,出现以下错误:OSError:[WinError 193]%1不是有效的Win32应用程序。
它曾经可以正常工作,但是前几天我在cmd上运行了“ pip install numpy”,这样我就可以在我的PyCharm项目(不在anaconda环境中)上使用numpy了,从那时起我就一直在使用Anaconda 3 64bit应用程序上的问题。
我已经从计算机上卸载了所有Python,然后重新安装了Anaconda 3 64位,但是仍然出现此错误。
对我来说没有意义的是numpy在我的Anaconda软件包列表中(我在cmd上键入了“ conda list”,并且numpy在那)。
import numpy
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
in
----> 1 import numpy
~\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py in
138
139 # Allow distributors to run custom init code
--> 140 from . import _distributor_init
141
142 from . import core
~\AppData\Roaming\Python\Python37\site-packages\numpy\_distributor_init.py in
24 # NOTE: would it change behavior to load ALL
25 # DLLs at this path vs. the name restriction?
---> 26 WinDLL(os.path.abspath(filename))
27 DLL_filenames.append(filename)
28 if len(DLL_filenames) > 1:
~\Anaconda3\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
362
363 if handle is None:
--> 364 self._handle = _dlopen(self._name, mode)
365 else:
366 self._handle = handle
OSError: [WinError 193] %1 is not a valid Win32 application