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 https://files.pythonhosted.org/packages/30/db/9e38760b32e3e7f40cce46dd5fb107b8c73840df38f0046d8e6514e675a1/pip-19.2.3-py2.py3-none-any.whl (1.4MB)
     |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 1.4MB 437kB/s
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, 2019 in Python by Hannah
• 18,030 points
1,051 views

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, 2019 by Jason

selected Dec 3, 2019 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, 2019 in Python by Omkar
• 69,000 points
80 views
0 votes
1 answer

How to write a regular expression to check whether an input is an identifier or not?

As per the documentation, an identifer can ...READ MORE

answered Aug 8, 2019 in Python by Neel
• 3,010 points
272 views
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, 2019 in Python by Neel
• 3,010 points
36 views
0 votes
1 answer
+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, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 765 views
0 votes
0 answers
+4 votes
6 answers
0 votes
1 answer

Python error "ValueError: size needs to be (int width, int height)" while using pygame.Surface

pygame.Surface takes in integer values for building ...READ MORE

answered Jun 19, 2019 in Python by Varsha
416 views