无法使用pip安装或搜索。协议错误:权限错误(13)

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

在终端上输入

pip install 'package name'
pip search 'package name'
始终会导致错误。我使用的是windows 10操作系统,从python.org下载了python,python版本:3.12.4,pip版本:24.0。

在互联网上搜索了所有解决方案,但没有任何效果。

pip install
在我的笔记本电脑上工作正常,所以网络没有问题。我记得它过去工作得很好,所以很可能我在计算机上改变了一些东西,我还记得在问题出现之前用巧克力搞乱了(也许它是相关的)。

这是错误:

$pip install pyautogui
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /simple/pyautogui/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /simple/pyautogui/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /simple/pyautogui/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /simple/pyautogui/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /simple/pyautogui/
ERROR: Could not find a version that satisfies the requirement pyautogui (from versions: none)
ERROR: No matching distribution found for pyautogui

当输入我在互联网上找到的命令时,它看起来像这样:

$curl pypi(...).org | (...)

我收到与文件“firefox.browser”相关的错误

这些是我尝试过的事情:

  1. 关闭防火墙
  2. 以管理员身份运行命令
  3. 使用
    --user
    标签
  4. 使用虚拟环境(venv)
  5. un / 重新安装 python/pip
  6. 将 python 添加到路径
  7. 检查 256 个字符路径长度限制设置
  8. 输入命令
    $pip install --upgrade pip
    结果相同 错误
  9. $curl https://pypi.org/simple/pyautogui/
    命令工作正常
python pip
1个回答
0
投票

我在https://ru.stackoverflow.com/questions/1539896/pip-permission-denied找到了答案。这表明我使用旧版本的Python,我下载了Python版本:3.8.1和PIP版本:19.2.3,现在一切正常。

© www.soinside.com 2019 - 2024. All rights reserved.