【发布时间】:2022-01-26 17:19:55
【问题描述】:
我无法在 python 中导入 Scipy 包。我正在使用几乎最新的 Anaconda 安装,并且安装了很多软件包并且工作正常,除了 Scipy。当我尝试导入 Scipy 时,会发生这种情况:
(base) C:\WINDOWS\system32>python
Python 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:22:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\Anaconda3\lib\site-packages\scipy\__init__.py", line 136, in <module>
from . import _distributor_init
File "D:\Anaconda3\lib\site-packages\scipy\_distributor_init.py", line 59, in <module>
WinDLL(os.path.abspath(filename))
File "D:\Anaconda3\lib\ctypes\__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'D:\Anaconda3\lib\site-packages\scipy\.libs\libbanded5x.CBCBXIAYFUWOYCSBXUA2BT6W76FYX4C7.gfortran-win_amd64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
仅供参考,我正在使用:
- Python 3.8.12
- Numpy 1.20.3
- Scipy 1.7.3
我没有尝试正确删除 Scipy 并再次重新安装,因为删除它也会删除我正在积极使用的许多其他软件包。但是,我确实从 Anaconda 安装中的“site-packages”目录中手动删除了整个 scipy 目录,然后使用 pip 重新安装 scipy。它没有帮助。
提前感谢您的帮助。
【问题讨论】: