使用Anaconda Navigator更新某些软件包(numpy,matplotlib等)和Spyder之后; 我使用这些软件包的代码不再起作用,并且在导入时出现错误。
期待更好的理解和解决的建议...
在使用IPython控制台并在下面输入时:
In [1]: 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:
E:\Programs\Anaconda\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