I am trying to upgrading pip from 8.1.1 to 8.1.2 .
But it showing following 'PermissionError: [WinError 5] Access is denied
:
How to upgrade pip?
C:\>python -m pip install --upgrade pip
Collecting pip
Using cached pip-8.1.2-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Exception:
Traceback (most recent call last):
File "C:\Program Files\Python35\lib\shutil.py", line 538, in move
os.rename(src, real_dst)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python35\\lib\\site-packages\\pip-8.1.1.dist-info\\description.rst' -> 'C:\\Users\\user\\AppD
ata\\Local\\Temp\\pip-nen4ldwg-uninstall\\program files\\python35\\lib\\site-packages\\pip-8.1.1.dist-info\\description.rst'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python35\lib\site-packages\pip\basecommand.py", line 209, in main
status = self.run(options, args)
File "C:\Program Files\Python35\lib\site-packages\pip\commands\install.py", line 317, in run
prefix=options.prefix_path,
File "C:\Program Files\Python35\lib\site-packages\pip\req\req_set.py", line 726, in install
requirement.uninstall(auto_confirm=True)
File "C:\Program Files\Python35\lib\site-packages\pip\req\req_install.py", line 746, in uninstall
paths_to_remove.remove(auto_confirm)
File "C:\Program Files\Python35\lib\site-packages\pip\req\req_uninstall.py", line 115, in remove
renames(path, new_path)
File "C:\Program Files\Python35\lib\site-packages\pip\utils\__init__.py", line 267, in renames
shutil.move(old, new)
File "C:\Program Files\Python35\lib\shutil.py", line 553, in move
os.unlink(src)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python35\\lib\\site-packages\\pip-8.1.1.dist-info\\description.rst'
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
This problem occurs even with administrator privileges.