首页 > 解决方案 > 在anaconda python上导入scipy时出现FileNotFoundError

问题描述

操作系统:Windows 10 Home Python 解释器:Anaconda with python 3.8.8

我已经使用“conda install scipy==1.6.2”在 anaconda 上安装了 scipy 模块,它声明“# All requested packages already installed.”。但是,当我打开 python ide 并导入 scipy 时,出现以下错误。

我尝试解决的方法是重新安装 scipy 模块和“conda update --all”。然而,这些都失败了。解决这个问题的任何方法。提前致谢。

import scipy

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\tys\.conda\envs\renv\lib\site-packages\scipy\__init__.py", line 130, in <module>
    from . import _distributor_init
  File "C:\Users\tys\.conda\envs\renv\lib\site-packages\scipy\_distributor_init.py", line 59, in <module>
    WinDLL(os.path.abspath(filename))
  File "C:\Users\tys\.conda\envs\renv\lib\ctypes\__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\tys\.conda\envs\renv\lib\site-packages\scipy\.libs\libbanded5x.3OIBJ6VWWPY6GDLEMSTXSIPCHHWASXGT.gfortran-win_amd64.dll' (or one of its dependencies). Try using the full path with constructor syntax.

标签: pythonscipyfile-not-found

解决方案


您应该尝试这里给出的解决方案(https://github.com/pytroll/satpy/issues/1835):

conda install -c defaults scipy

它对我有用。


推荐阅读