Unable to upgrade pip using pip install --upgrade pip

pip
19,650

There are two ways to go about this:

* (Recommended way) is to just append the --user flag to the command you are trying to run, so you would run pip install --upgrade pip --user

or

* open cmd as an administrator and run that command

..................................................................................................................................

The reason this happened is because the folder you are trying to install pip is a folder that requires admin privileges to access.

Next time you should pay attention to what the error message says.
Most of the time the error message is self explanitory and there is no need to post a new question on S.O.
Share:
19,650

Related videos on Youtube

Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I wanted to upgrade pip for installing libraries to learn machine learning. But i am unable to do so.

    C:\Users\adith>pip install --upgrade pip
    Collecting pip
      Downloading pip-21.0.1-py3-none-any.whl (1.5 MB)
         |████████████████████████████████| 1.5 MB 211 kB/s
    Installing collected packages: pip
      Attempting uninstall: pip
        Found existing installation: pip 20.2.3
        Uninstalling pip-20.2.3:
          Successfully uninstalled pip-20.2.3
    ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Users\\adith\\AppData\\Local\\Temp\\pip-uninstall-40mydp3z\\pip.exe'
    Consider using the `--user` option or check the permissions.
    

    I am getting the above error. Any help would be very much appreciated. Thanks!

  • Admin
    Admin about 3 years
    thnx a bunch... it worked... my bad i didnt notice...