试图在虚拟环境中升级PIP,但拒绝获得“访问”。

发布于 2025-01-31 02:45:19 字数 762 浏览 3 评论 0原文

当我尝试在虚拟环境中使用该命令时

pip install --upgrade pip

,它向我展示了以下消息:

Requirement already satisfied: pip in c:\windows\system32\venv\lib\site-packages (22.0.4)
Collecting pip
  Using cached pip-22.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.0.4
    Uninstalling pip-22.0.4:
      Successfully uninstalled pip-22.0.4
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-uninstall-r4o_l0mr\\pip.exe'
Check the permissions.

我在Windows 10,Python 3.9.13中,在命令提示符中作为管理员。

When I tried to use the command

pip install --upgrade pip

in a virtual environment, it showed me the following message:

Requirement already satisfied: pip in c:\windows\system32\venv\lib\site-packages (22.0.4)
Collecting pip
  Using cached pip-22.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.0.4
    Uninstalling pip-22.0.4:
      Successfully uninstalled pip-22.0.4
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-uninstall-r4o_l0mr\\pip.exe'
Check the permissions.

I am on Windows 10, Python 3.9.13, in command prompt as administrator.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

指尖上得阳光 2025-02-07 02:45:19

尝试:

python -m pip install --upgrade pip

Try:

python -m pip install --upgrade pip
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文