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,410 points
4,138 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

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 in Python by Niroj
• 76,780 points
409 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 in Python by Niroj
• 76,780 points
451 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 in Python by Niroj
• 76,780 points
1,996 views
0 votes
1 answer

I tried to install this pip cryptography in Pycharm but I'm getting an error

Hello @Dilpreet , Have you tried updating pip version? ...READ MORE

answered Aug 4 in Python by Niroj
• 76,780 points
245 views
+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 1,557 views
0 votes
0 answers
+4 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,800 points
1,173 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
1,000 views