'How to upgrade pip?

I want to install tensorflow, but I need to upgrade pip. How to upgrade pip? I tried to upgrade through the command line and this is what I got.

C:\Users\garoo>python -m pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python36-32\\lib\\site-packages\\pip-10.0.1.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.

You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\garoo>python -m pip install --upgrade pip

Here is a picture of what I put into the command line



Solution 1:[1]

To upgrade pip from the command line:

python -m pip install --upgrade pip

Solution 2:[2]

You do not need to upgrade pip to install tensorflow. Although if you still wish to do so you can try this

pip install --user --upgrade pip

Else try running the CMD as Admin

Solution 3:[3]

For permission error while installing Python dependencies, you need to run the terminal or command prompt or powershell as administrator

Example below:

enter image description here

Solution 4:[4]

How to upgrade pip using command prompt

  1. Open Command Prompt

    Open the program in Start Menu

    Click the lower-left Start button to open the Start Menu

    input cmd in the empty box and tap Command Prompt in the results

  2. Type the following command to uninstall the old pip package and install the current version of pip package

    python -m pip install --upgrade pip

Collecting pip

Downloading pip-22.0.4-py3-none-any.whl (2.1 MB)

 ---------------------------------------- 2.1/2.1 MB 284.1 kB/s eta 0:00:00

Installing collected packages: pip

Attempting uninstall: pip

Found existing installation: pip 22.0.3

Uninstalling pip-22.0.3:

  Successfully uninstalled pip-22.0.3

Successfully installed pip-22.0.4

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Iain Hunter
Solution 2 Aaron Pereira
Solution 3 Jeril
Solution 4 DS_ShraShetty