0
I used "pip install scikit-learn" to install sklearn. During the installation process, I received an error msg:
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\Users\ajgu2000\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\datasets\tests\data\openml\292\api-v1-json-data-list-data_name-australian-limit-2-data_version-1-status-deactivated.json.gz'
This seems to be a data-set file, so I don't see why it's causing a massive installation error.
The strange thing is that when I do "pip list", I can see that "scikit-learn 0.21.3" is installed. However, when I import the module in my code, it raised an error saying that the "check_build" file was missing.
Traceback (most recent call last): File "c:/Users/ajgu2000/Documents/GitHub/DeepLearningPython35/mnist_svm.py", line 13, in from sklearn import svm File "C:\Users\ajgu2000\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn__init__.py", line 75, in from . import check_build ImportError: cannot import name '__check_build' from 'sklearn' (C:\Users\ajgu2000\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn__init.py)
I commented out the code for that (as recommended by this presuming it was just a bug: https://stackoverflow.com/questions/15274696/importerror-in-importing-from-sklearn-cannot-import-name-check-build), but I then received another error about missing "sklearn.utils".
Traceback (most recent call last): File "c:/Users/ajgu2000/Documents/GitHub/DeepLearningPython35/mnist_svm.py", line 13, in from sklearn import svm File "C:\Users\ajgu2000\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn__init__.py", line 76, in from .base import clone File "C:\Users\ajgu2000\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\base.py", line 16, in from .utils import _IS_32BIT ModuleNotFoundError: No module named 'sklearn.utils'
1I believe the error may be due to me installing python from the windows store. I uninstalled it and installed the 64-bit version from the python website, and it seems to be working fine now – Akash Gupta – 2019-08-08T17:01:49.743