Error when trying to import sklearn modules : ImportError: DLL load failed: The specified module could not be found

Taha Abdelhalim Nakabi

I tried to do the following importations for a machine learning project:

from sklearn import preprocessing, cross_validation, svm
from sklearn.linear_model import LinearRegression

I got this error message:

Traceback (most recent call last):
  File "C:/Users/Abdelhalim/PycharmProjects/ML/stock pricing.py", line 4, in <module>
    from sklearn import preprocessing, cross_validation, svm
  File "C:\Python27\lib\site-packages\sklearn\__init__.py", line 57, in <module>
    from .base import clone
  File "C:\Python27\lib\site-packages\sklearn\base.py", line 12, in <module>
    from .utils.fixes import signature
  File "C:\Python27\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module>
    from .validation import (as_float_array,
  File "C:\Python27\lib\site-packages\sklearn\utils\validation.py", line 18, in <module>
    from ..utils.fixes import signature
  File "C:\Python27\lib\site-packages\sklearn\utils\fixes.py", line 291, in <module>
    from scipy.sparse.linalg import lsqr as sparse_lsqr
  File "C:\Python27\lib\site-packages\scipy\sparse\linalg\__init__.py", line 112, in <module>
    from .isolve import *
  File "C:\Python27\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module>
    from .iterative import *
  File "C:\Python27\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in <module>
    from . import _iterative
ImportError: DLL load failed: The specified module could not be found.

Please help I tried everything but nothing worked. I tried these solutions as well: ImportError: DLL load failed: Le module spécifié est introuvable

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

Joseph Lemien

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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ImportError: DLL load failed: The specified module could not be found (sklearn)

From Dev

ver.2 PyGreSQL ERROR: from _pg import * ImportError: DLL load failed: The specified module could not be found

From Dev

Pyinstaller: Import Error: DLL load failed: The specified module could not be found

From Dev

Import Error: DLL load failed: The specified module could not be found when using cxfreeze

From Dev

ImportError: DLL load failed: The specified procedure could not be found. (import sklearn)

From Dev

Trying to install TensorFlow- GPU...failed with ImportError: DLL load failed: The specified module could not be found

From Dev

from scipy.linalg import _fblas: ImportError: DLL load failed: The specified module could not be found

From Dev

ImportError: DLL load failed: The specified module could not be found. While attempting to import TensorFlow

From Dev

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

From Dev

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

From Dev

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

From Java

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

From Java

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

From Dev

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

From Dev

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

From Dev

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

From Dev

Tensorflow on windows - ImportError: DLL load failed: The specified module could not be found

From Dev

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

From Dev

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

From Dev

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

From Dev

How can I bypass kivy module error: ImportError: DLL load failed: The specified module could not be found?

From Dev

Getting the error "DLL load failed: The specified module could not be found." while trying to import tensorflow for Windows in Anaconda using PyCharm

From Dev

"DLL load failed: The specified module could not be found" error in importing "kfold" from sklearn

From Java

"import torch" giving error "from torch._C import *, DLL load failed: The specified module could not be found"

From Dev

import matplotlib._png as _png Import: Error: DLL load failed: The specified module could not be found

From Dev

cx_Freeze ImportError: DLL load failed failed while importing _ctypes: The specified module could not be found

From Dev

Python: "ImportError: DLL load failed: The specified module could not be found." Problems when importing ffn (finance library for python)

From Dev

ImportError: DLL load failed while importing numpy_ops: The specified module could not be found. when importing spacy in Python

From Dev

import QCustomPlot2 ImportError: DLL load failed: The specified procedure could not be found

Related Related

  1. 1

    ImportError: DLL load failed: The specified module could not be found (sklearn)

  2. 2

    ver.2 PyGreSQL ERROR: from _pg import * ImportError: DLL load failed: The specified module could not be found

  3. 3

    Pyinstaller: Import Error: DLL load failed: The specified module could not be found

  4. 4

    Import Error: DLL load failed: The specified module could not be found when using cxfreeze

  5. 5

    ImportError: DLL load failed: The specified procedure could not be found. (import sklearn)

  6. 6

    Trying to install TensorFlow- GPU...failed with ImportError: DLL load failed: The specified module could not be found

  7. 7

    from scipy.linalg import _fblas: ImportError: DLL load failed: The specified module could not be found

  8. 8

    ImportError: DLL load failed: The specified module could not be found. While attempting to import TensorFlow

  9. 9

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

  10. 10

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

  11. 11

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

  12. 12

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

  13. 13

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

  14. 14

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

  15. 15

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

  16. 16

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

  17. 17

    Tensorflow on windows - ImportError: DLL load failed: The specified module could not be found

  18. 18

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

  19. 19

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

  20. 20

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

  21. 21

    How can I bypass kivy module error: ImportError: DLL load failed: The specified module could not be found?

  22. 22

    Getting the error "DLL load failed: The specified module could not be found." while trying to import tensorflow for Windows in Anaconda using PyCharm

  23. 23

    "DLL load failed: The specified module could not be found" error in importing "kfold" from sklearn

  24. 24

    "import torch" giving error "from torch._C import *, DLL load failed: The specified module could not be found"

  25. 25

    import matplotlib._png as _png Import: Error: DLL load failed: The specified module could not be found

  26. 26

    cx_Freeze ImportError: DLL load failed failed while importing _ctypes: The specified module could not be found

  27. 27

    Python: "ImportError: DLL load failed: The specified module could not be found." Problems when importing ffn (finance library for python)

  28. 28

    ImportError: DLL load failed while importing numpy_ops: The specified module could not be found. when importing spacy in Python

  29. 29

    import QCustomPlot2 ImportError: DLL load failed: The specified procedure could not be found

HotTag

Archive