Python: Could Not Install Packages Due to an Oserror: [Errno 2] No Such File or Directory
I Try to Use Pip to Install Sklearn, and I Receive the Following Error Message: Error: Could Not Install Packages Due to an Oserror: [Errno 2] No Such File or...
I try to use pip to install sklearn, and I receive the following error message:
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\Users\13434\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'**.
Can anyone help? Thanks.
7 Answers
I had exactly the same issue installing this package on my Windows laptop - then read of the 260 character limit. I followed this guide - and after rebooting, successfully installed 'sklearn':
Run CMD in administrator mode and enter:
pip install sklearn --user
and Done!!
Try sudo pip install 'package name' --user
I removed and reinstalled Python and then entered this into my terminal command line:
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pip install --upgrade pip
and it fixed my issue.
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pip install
and it should work.
If Windows is 8.
You need to change your access policy inside Python3 repository where all packages, including PIP.
"Properties" -> "Security" -> select a user -> select "Change" and everything below.
Next, update PIP (py -m pip install --upgrade pip) and install the packages inside ENV
Fixed by doing
conda install google-pasta
this directory under envs/xxxx/Lib/site-packages/ was not having METADATA. Likely to be partial installation.
keep package up to date.I upgarde my pip and the problem is gone.