Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when loading scipy: OSError: [WinError 126] The specified module could not be found

Tags:

python

scipy

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

like image 234
C_Z_ Avatar asked Jun 25 '20 01:06

C_Z_


1 Answers

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

like image 101
Jahjajaka Avatar answered Sep 27 '22 23:09

Jahjajaka