Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with importing scipy.optimize. (Windows10 64b, Python 3.7)

I have a problem importing scipy.optimize, as well as other scipy's modules. Every time I run the code I get the following error:

File "C:/Users/project/test.py", line 4, in from scipy.optimize import *

File "C:\Users\project\venv\lib\site-packages\scipy__init__.py", line 156, in from . import fft

File "C:\Users\project\venv\lib\site-packages\scipy\fft__init__.py", line 76, in from ._basic import (

File "C:\Users\project\venv\lib\site-packages\scipy\fft_basic.py", line 1, in from scipy._lib.uarray import generate_multimethod, Dispatchable

File "C:\Users\project\venv\lib\site-packages\scipy_lib\uarray.py", line 27, in from ._uarray import *

File "C:\Users\project\venv\lib\site-packages\scipy_lib_uarray__init__.py", line 114, in from ._backend import *

File "C:\Users\project\venv\lib\site-packages\scipy_lib_uarray_backend.py", line 15, in from . import _uarray # type: ignore

ImportError: DLL load failed: The specified module could not be found.

I tried reinstalling both numpy and scipy as well as installing scipy manually from here as some suggested, however nothing changed. I use Windows10 64b, Python 3.7.

like image 205
george doultsinos Avatar asked Nov 20 '25 06:11

george doultsinos


1 Answers

I uninstalled SciPy 1.4.1 and installed SciPy 1.4.0. It resolved the problem.

pip uninstall scipy
pip install scipy==1.4.0
like image 178
Kristiaan Avatar answered Nov 25 '25 00:11

Kristiaan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!