Error while upgrading pip "ERROR: Could not install packages due to an EnvironmentError: [Error 5] Access is denied: "

+1 vote

Hey Folks, I received the following warning message:

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

I tried upgrading the pip version with the above-mentioned command:

python -m pip install --upgrade pip

I got the following error:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop
support for Python 2.7.
Collecting pip
  Downloading (1.4MB)
Installing collected packages: pip
  Found existing installation: pip 19.1.1
    Uninstalling pip-19.1.1:
      Successfully uninstalled pip-19.1.1
ERROR: Could not install packages due to an EnvironmentError: [Error 5] Access is denied: 'c:\\users\\kalgi_~1\\appdata\\local\\temp\\pip-uninstall-qnu6j7\\pip.exe'
Consider using the `--user` option or check the permissions.
Oct 3 in Python by Hannah
• 17,070 points

1 answer to this question.

+1 vote
Best answer

As mentioned in the error logs, try using the --user flag to make sure you have the right permissions.

python -m pip install --user --upgrade pip

This should work!

answered Oct 3 by Jason

selected Dec 3 by Kalgi
super thank you sir,

its works.
Please do upvote Jason's answer if it has helpde you!

Related Questions In Python

0 votes
1 answer

How to print a message or the error if a file is not found?

To print the message that file is not ...READ MORE

answered Jan 2 in Python by Omkar
• 68,160 points
0 votes
1 answer
0 votes
1 answer

What is the procedure to install python packages in IPython?

You can use the '!' prefix like ...READ MORE

answered Aug 21 in Python by Neel
• 3,010 points
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 409 views
+4 votes
6 answers
0 votes
1 answer