Error when trying to import sklearn modules : ImportError: DLL load failed: The specified module could not be found
This line points to scipy.
from scipy.sparse.linalg import lsqr as sparse_lsqr
You can try:
pip uninstall scipy
pip install scipy
enjoy!
You should open up "C:\Python27\lib\site-packages\sklearn\utils\fixes.py", and edit the contents. There are two specific changes you should make:
First, copy-and-paste the contents of https://github.com/scikit-learn/scikit-learn/blob/74a9756fa784d1f22873ad23c8b4948c6e290108/sklearn/utils/fixes.py into the file "C:\Python27\lib\site-packages\sklearn\utils\fixes.py".
Second, replace the line if np_version < (1, 12, 0):
with if np_version < (1, 12):
.
More background info and detail available here, in a great answer from user DSM.
Reinstallation of scipy
, numpy
, and scikit-learn
packages fixed the error in my case.