简体   繁体   中英

How to update pip to latest version 20.0.2

While using this command

"python -m pip install --upgrade pip"

I get this error message:

"Collecting pip
  Using cached https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python38-32\\lib\\site-packages\\pip-19.2.3.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.

WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command."

What's the solution to this?

I'm not too sure what the error could be, but I suspect the problem is that you are not running your terminal/command prompt as an administrator . So when you are launching your terminal/command prompt just right-click and run as administrator

Or you could try using a different method of updating pip ,

pip install --upgrade pip

Can you try with this command instead ? Also if any issue persists try running cmd as Administrator

python -m pip install --user --upgrade pip

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM