Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 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.

like image 485
J__1 Avatar asked Jan 31 '21 15:01

J__1


People also ask

How do I get pip in Python?

Step 1: Download the get-pip.py (https://bootstrap.pypa.io/get-pip.py) file and store it in the same directory as python is installed. Step 2: Change the current path of the directory in the command line to the path of the directory where the above file exists. Step 4: Now wait through the installation process. Voila!

Why can't I install packages in Pycharm?

Try to create another Python interpreter that is based on the Python version that meets the requirement. The package cannot be installed because you don't have permissions to install it. Try to install the package using super-user privileges, for example, sudo pip install <package name> .


1 Answers

Run CMD in administrator mode and enter:

pip install sklearn --user

and Done!!

like image 86
Vidura Karunarathna Avatar answered Sep 28 '22 04:09

Vidura Karunarathna