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?
<blockquote>
  <p>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'</p>
</blockquote>

<p>During handling of the above exception, another exception occurred:</p>

<blockquote>
  <p>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.</p>
</blockquote>

<p>and</p>

<blockquote>
  <p>C:>python -m pip -qqq install -U pip
  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-3i5xeu8u-uninstall\program files\python35\lib\site-packages\pip-8.1.1.dist-info\description.rst'</p>
</blockquote>

<p>During handling of the above exception, another exception occurred:</p>

<blockquote>
  <p>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'</p>
</blockquote>

<p>Upgrade PIP on your default python environment required <code>sudo</code>, i.e. in Windows term, you must your start command prompt as administrator mode. In fact, this is not recommended.</p>

<p>You don't need to use <code>sudo</code>/'Windows adminsitrators" if you setup virtualenv. It is python best practice to setup <a href="https://virtualenv.pypa.io/en/stable/installation/" rel="nofollow">Python virtualenv </a>, So you can separate the pip package required for individual project.   For windows, it is <a href="https://virtualenv.pypa.io/en/stable/userguide/" rel="nofollow">similar setup</a>.</p>

<p>Nevertheless, if you have decent PC with enough RAM, just install Virtualbox and deploy ubuntu. This way, your don't need to deal with windows python package installation/upgrade that overlook by developer (although all python package suppose to work out of the box) .</p>

python django pip pycharm python-3.5.2