Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update pip to latest version 20.0.2

Tags:

python

While using this command

"python -m pip install --upgrade pip"

I get this error message:

"Collecting pip
  Using cached https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python38-32\\lib\\site-packages\\pip-19.2.3.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.

WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command."

What's the solution to this?

like image 378
Gourav KD Avatar asked Mar 02 '23 15:03

Gourav KD


2 Answers

I'm not too sure what the error could be, but I suspect the problem is that you are not running your terminal/command prompt as an administrator. So when you are launching your terminal/command prompt just right-click and run as administrator

Or you could try using a different method of updating pip,

pip install --upgrade pip
like image 127
Kirshan Murali Avatar answered Mar 05 '23 14:03

Kirshan Murali


Can you try with this command instead ? Also if any issue persists try running cmd as Administrator

python -m pip install --user --upgrade pip
like image 26
Dragon Avatar answered Mar 05 '23 15:03

Dragon