加载 scipy 时出错:OSError: [WinError 126] 找不到指定的模块 [英] Error when loading scipy: OSError: [WinError 126] The specified module could not be found
本文介绍了加载 scipy 时出错:OSError: [WinError 126] 找不到指定的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在 virtualenv 中使用 pip 为 python3 安装了 scipy.当我尝试导入 scipy 时,出现以下错误:
<预><代码>>>>进口scipy回溯(最近一次调用最后一次):文件<stdin>",第 1 行,在 <module> 中.文件C:\Users\chriz\PycharmProjects\untitled1\venv\lib\site-packages\scipy\__init__.py",第 104 行,在我似乎缺少某种依赖,但我不知道依赖是什么
当我寻找它试图打开的 .dll 时,它似乎在那里
解决方案
刚刚遇到了同样的错误.解决方案是降级scipy
:
pip install scipy==1.4.1
我在这里找到的:
https://github.com/pytorch/ignite/issues/1153
I have installed scipy for python3 using pip inside of a virtualenv. When I try to import scipy, I get the following error:
>>> import scipy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\chriz\PycharmProjects\untitled1\venv\lib\site-packages\scipy\__init__.py", line 104, in <module>
from . import _distributor_init
File "C:\Users\chriz\PycharmProjects\untitled1\venv\lib\site-packages\scipy\_distributor_init.py", line 61, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2032.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
I seem to be missing some sort of dependency, but I don't know what the dependency is
When I look for the .dll that it is trying to open, it appears to be there
解决方案
just faced the same error. The solution is downgrade scipy
:
pip install scipy==1.4.1
I found it here:
https://github.com/pytorch/ignite/issues/1153
这篇关于加载 scipy 时出错:OSError: [WinError 126] 找不到指定的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文