为什么在Windows上出现多余的点升级错误?

问题描述 投票:0回答:1

首先,这是NOT与之前多次提出的问题相同。我仅通过点子升级而不是其他软件包来体验。

我的pip升级实际上成功了,但是我仍然遇到EnvironmentError。为什么会发生这种情况,我该如何解决?

注意:我的python安装不在默认路径(c:\ Users \ \ AppData \ Local)上,它安装在c:\ Progs \ Python下这是控制台交互的全文:

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

D:\>pip install -U pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB)
     |████████████████████████████████| 1.4MB 547kB/s
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Users\\<usrname>\\AppData\\Local\\Temp\\pip-uninstall-qkg3722a\\pip.exe'
Consider using the `--user` option or check the permissions.


D:\>pip install -U pip --user
Requirement already up-to-date: pip in c:\progs\python\python37\lib\site-packages (19.3.1)
python windows pip
1个回答
0
投票

Windows对于覆盖当前打开的文件有点烦人。因此,如果您呼叫pip.exe,将很难用新版本更新pip.exe。只需使用

py -m pip install -U pip 

而不是

pip install -U pip
© www.soinside.com 2019 - 2024. All rights reserved.