我想升级pip安装库来学习机器学习。但我不能这样做。
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.我得到了上述错误。任何帮助都将不胜感激。谢谢!
发布于 2021-03-03 11:53:52
要做到这一点有两种方法:
*(推荐的方法)是将--user标志附加到试图运行的命令中,以便运行pip install --upgrade pip --user
或
*以管理员身份打开cmd并运行该命令
..................................................................................................................................
之所以会发生这种情况,是因为您试图安装的pip文件夹是一个需要管理员权限访问的文件夹。
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.https://stackoverflow.com/questions/66456084
复制相似问题