首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用pip安装升级pip --升级pip

无法使用pip安装升级pip --升级pip
EN

Stack Overflow用户
提问于 2021-03-03 11:26:21
回答 1查看 22.7K关注 0票数 2

我想升级pip安装库来学习机器学习。但我不能这样做。

代码语言:javascript
复制
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.

我得到了上述错误。任何帮助都将不胜感激。谢谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-03 11:53:52

要做到这一点有两种方法:

*(推荐的方法)是将--user标志附加到试图运行的命令中,以便运行pip install --upgrade pip --user

*以管理员身份打开cmd并运行该命令

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

之所以会发生这种情况,是因为您试图安装的pip文件夹是一个需要管理员权限访问的文件夹。

代码语言:javascript
复制
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.
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66456084

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档