python - 在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.
解决方案
您应该尝试这里给出的解决方案(https://github.com/pytroll/satpy/issues/1835):
conda install -c defaults scipy
它对我有用。
推荐阅读
- xml - Xslt 从具有 xml 元素路径作为名称并将其值作为值的 xml 创建属性文件
- python - 进行赋值时,定义的类变量列表中的所有元素都获得相同的值
- node.js - 如何异步多次调用相同的api但使用不同的参数 - 节点/快递
- javascript - 如何从 JavaScript 函数调用 Angular 4 方法?
- c# - 如何获得跨度
不带 unsafe 关键字的结构视图 - verilog - 在verilog中注册和重置卷积输出
- android - Android FloatingActionButton OnClickListener 不起作用
- ballerina - 我可以获得联合类型变量的实际类型吗?
- sql - 我可以在访问 VBA 中使用 FULL OUTER JOIN 吗?
- janusgraph - JanusGraph 中的处理属性值不一致