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,570 points
18,476 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!
thank u soo much for that
thanks dude ! very much appreciated
It is  showing as E:\Python 3.8\python.exe: No module named pip

What should I do?

Hello @ Hritik,

Just be sure that you have include python to windows PATH variable, then run:

python -m ensurepip

Related Questions In Python

0 votes
1 answer

Python: Could not install packages due to an OSError: [Errno 2] No such file or directory

I also met with the same problem ...READ MORE

answered Apr 28, 2022 in Python by narikkadan
• 63,420 points
34,474 views
0 votes
1 answer

Error:pip install mysql-python fails with EnvironmentError: mysql_config not found

Hello @kartik, It seems mysql_config is missing on ...READ MORE

answered May 5, 2020 in Python by Niroj
• 82,880 points
2,457 views
0 votes
1 answer

Error:pip install mysql-python fails with EnvironmentError: mysql_config not found

Hello @kartik, For centos users: yum install -y mysql-devel python-devel python-setuptools then pip ...READ MORE

answered May 27, 2020 in Python by Niroj
• 82,880 points
2,942 views
0 votes
1 answer

Error:'pip' is not recognized as an internal or external command

Hello @kartik, Try this: Type 'start %appdata%' in cmd. After ...READ MORE

answered Aug 3, 2020 in Python by Niroj
• 82,880 points
8,080 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

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

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
3,420 views
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
5,180 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP