When trying to install Python's sklearn package on Windows 10 using pip I am given an EnvironmentError that tells me there is no such file or directory of a specific file:
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\Users\Rik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\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'
I have tried reinstalling the following packages numerous times:
I have also tried downloading the github master folder for sklearn and pasting it into the directory where the installer expects the file to be, and even then when installing with pip it tells me the file is missing.
Furthermore I tried installing it via the github repository by downloading it and running
python setup.py install
But this results in weird Microsoft Visual Studio errors because apparently it is trying to run a test program or something, not sure.
Any suggestions to fix this problem?
Download the source package from http://pypi.python.org/pypi/scikit-learn/ , unpack the sources and cd into the source directory. or alternatively (also from within the scikit-learn source folder): pip install . Packages installed with the python setup.py install command cannot be uninstalled nor upgraded by pip later.
Using such an isolated environment makes it possible to install a specific version of scikit-learn with pip or conda and its dependencies independently of any previously installed Python packages.
Use sklearn. __version__ to display the installed version of scikit-learn. Call sklearn. __version__ to return the current version of scikit-learn .
You can find the solution here: https://scikit-learn.org/stable/install.html
The problem occurs because the default path size limit is reached in your case, you can change this with the following steps:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With