Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access is denied when trying to pip install a package on Windows

Tags:

python

How to set path for python 3.7.0? I tried the every possible way but it still shows the error!

Could not install packages due to an EnvironmentError: [WinError 5]

Access is denied: 'c:\program files (x86)\python37-32\lib\site-packages\pip-10.0.1.dist-info\entry_points.txt'

Consider using the --user option or check the permissions

like image 288
Shwetali Rane Avatar asked Jun 30 '18 14:06

Shwetali Rane


People also ask

Why cant I do pip install?

One of the most common problems with running Python tools like pip is the “not on PATH” error. This means that Python cannot find the tool you're trying to run in your current directory. In most cases, you'll need to navigate to the directory in which the tool is installed before you can run the command to launch it.

Why pip install is not working in command prompt?

The error “'pip' is not recognized as an internal or external command” is encountered because of two main reasons that are. PIP Installation path is not added to the system variables: If you have installed python through prompt then you need to configure PIP path manually.

Does pip need admin?

To install Python packages (“eggs”) from the Python language's package manager pip, follow our instructions below. This can be done without Administrator access in a per-user, per-project clean manner with virtualenv.


2 Answers

Add --user to the command.

eg:

pip install -r requirements.txt --user 
like image 100
Surendiran S Avatar answered Sep 22 '22 21:09

Surendiran S


Run your command Prompt on Admin-Mode in Windows,it will stop throwing errors for user-rights.

Steps:

  1. On Windows, type "Cmd" on searchbox to search for command prompt.

  2. When "Command Prompt" search result appears,right-click>Run as Administrator.

like image 39
lionxlamb Avatar answered Sep 23 '22 21:09

lionxlamb