0

I am onto practising ML using python and visited through this link. I installed all of the packages mentioned in the link namely, scipy, numpy, matplotlib, pandas, sklearn and implemented the following code to check their respective versions and proper installation,

# scikit-learn
import sklearn
print('sklearn: {}'.format(sklearn.__version__))

but got the following error:

Traceback (most recent call last):
      File "VersionCheck.py", line 19, in <module>
        import sklearn
      File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\__init__.py", line 134, in <module>
        from .base import clone
      File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\base.py", line 13, in <module>
        from .utils.fixes import signature
      File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module>
        from .validation import (as_float_array,
      File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\utils\validation.py", line 18, in <module>
        from ..utils.fixes import signature
      File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\utils\fixes.py", line 144, in <module>
        from scipy.sparse.linalg import lsqr as sparse_lsqr  # noqa
      File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\linalg\__init__.py", line 114, in <module>
        from .isolve import *
      File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module>
        from .iterative import *
      File "C:\Users\HP\AppData\Local\Programs\Python\Python36\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.
James Z
  • 12,209
  • 10
  • 24
  • 44
Rahul Soni
  • 153
  • 3
  • 18

1 Answers1

0

To see a version of sklearn installed:

from sklearn import __version__

print(__version__)
Rahul Soni
  • 153
  • 3
  • 18
Greg
  • 31
  • 4