登录后更精彩...O(∩_∩)O...
您需要 登录 才可以下载或查看,没有账号?立即注册
×
pip无法从清华源下载,ERROR: HTTP error 403 while getting https://pypi.tuna.tsinghua.edu.cn
pip无法从清华源下载我的错误是无法从清华源下载opencv包。错误如下:
[] 纯文本查看 复制代码 ERROR: HTTP error 403 while getting 'https://pypi.tuna.tsinghua.edu.cn' ... 0323e8cab09548086c0 (from 'https://pypi.tuna.tsinghua.edu.cn/simple/opencv-python/') (requires-python:>=3.6)
解决方法更换pip默认源为阿里源
[] 纯文本查看 复制代码 pip config set global.index-url 'https://mirrors.aliyun.com/pypi/simple/'
查看默认源
[Bash shell] 纯文本查看 复制代码 pip config list
[Plain Text] 纯文本查看 复制代码 [size=14px](.venv) PS C:\Users\admin\PycharmProjects\Test> pip install frida[/size]
[size=14px]Looking in indexes: [url]https://pypi.tuna.tsinghua.edu.cn/simple[/url][/size]
[size=14px]Collecting frida[/size]
[size=14px] ERROR: HTTP error 403 while getting 'https://pypi.tuna.tsinghua.edu.cn/packages/b0/ad/dd6e9045d8[/size]
[size=14px]1216c22b75651ae5d4df575e22a06632e80fe30d1ff7b03491/frida-16.3.3-cp37-abi3-win_amd64.whl (from [url]https://pypi.tuna.tsinghua.edu.cn/simple/frida/[/url]) (requires-python:>=3.7)'[/size]
[size=14px]ERROR: Could not install requirement frida from 'https://pypi.tuna.tsinghua.edu.cn/packages/b0/ad/[/size]
[size=14px]dd6e9045d81216c22b75651ae5d4df575e22a06632e80fe30d1ff7b03491/frida-16.3.3-cp37-abi3-win_amd64.whl'[/size]
[size=14px] because of HTTP error 403 Client Error: Forbidden for url: 'https://pypi.tuna.tsinghua.edu.cn/pac'[/size]
[size=14px]kages/b0/ad/dd6e9045d81216c22b75651ae5d4df575e22a06632e80fe30d1ff7b03491/frida-16.3.3-cp37-abi3-w[/size]
[size=14px]in_amd64.whl for URL 'https://pypi.tuna.tsinghua.edu.cn/packages/b0/ad/dd6e9045d81216c22b75651ae5d[/size]
[size=14px]4df575e22a06632e80fe30d1ff7b03491/frida-16.3.3-cp37-abi3-win_amd64.whl (from [url]https://pypi.tuna.tsinghua.edu.cn/simple/frida/[/url]) (requires-python:>=3.7)'[/size]
[size=14px]
[/size]
[size=14px][notice] A new release of pip is available: 23.2.1 -> 24.1.1[/size]
[size=14px][notice] To update, run: python.exe -m pip install --upgrade pip[/size]
[size=14px](.venv) PS C:\Users\admin\PycharmProjects\Test> python.exe -m pip install --upgrade pip[/size]
[size=14px]Looking in indexes: 'https://pypi.tuna.tsinghua.edu.cn/simple'[/size]
[size=14px] ERROR: HTTP error 403 while getting 'https://pypi.tuna.tsinghua.edu.cn/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl (from [url]https://pypi.tuna.tsinghua.edu.cn/simple/pip/[/url]) (requires-python:>=3.8)'[/size]
[size=14px]ERROR: Could not install requirement pip from 'https://pypi.tuna.tsinghua.edu.cn/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl' because of HTTP error 403 Client Error: Forbidden for url: 'https://pypi.tuna.tsinghua.edu.cn/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl for URL [url]https://pypi.tuna.tsinghua.edu.cn/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl[/url] (from [url]https://pypi.tuna.tsinghua.edu.cn/simple/pip/[/url]) (requires-python:>=3.8)' [/size]
[size=14px]
[/size]
[size=14px][notice] A new release of pip is available: 23.2.1 -> 24.1.1[/size]
[size=14px][notice] To update, run: python.exe -m pip install --upgrade pip[/size]
[size=14px](.venv) PS C:\Users\admin\PycharmProjects\Test> python -V[/size]
[size=14px]Python 3.12.3[/size]
[size=14px](.venv) PS C:\Users\admin\PycharmProjects\Test> python -m pip install --upgrade pip[/size]
[size=14px]Looking in indexes: 'https://pypi.tuna.tsinghua.edu.cn/simple'[/size]
[size=14px]Requirement already satisfied: pip in c:\users\admin\pycharmprojects\test\.venv\lib\site-packages (23.2.1)[/size]
[size=14px]Collecting pip[/size]
[size=14px] ERROR: HTTP error 403 while getting 'https://pypi.tuna.tsinghua.edu.cn/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl (from [url]https://pypi.tuna.tsinghua.edu.cn/simple/pip/[/url]) (requires-python:>=3.8)'[/size]
[size=14px]ERROR: Could not install requirement pip from 'https://pypi.tuna.tsinghua.edu.cn/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl' because of HTTP er[/size]
[size=14px]ror 403 Client Error: Forbidden for url: 'https://pypi.tuna.tsinghua.edu.cn/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl' for URL 'https://pypi.tuna.tsinghua.edu.cn/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl (from [url]https://pypi.tuna.tsinghua.edu.cn/simple/pip/[/url]) (requires-python:>=3.8)' [/size]
[size=14px]
[/size]
[size=14px][notice] A new release of pip is available: 23.2.1 -> 24.1.1[/size]
[size=14px][notice] To update, run: python.exe -m pip install --upgrade pip[/size]
[size=14px](.venv) PS C:\Users\admin\PycharmProjects\Test> pip config set global.index-url 'https://mirrors.aliyun.com/pypi/simple/'[/size]
[size=14px]Writing to C:\Users\admin\AppData\Roaming\pip\pip.ini[/size]
[size=14px](.venv) PS C:\Users\admin\PycharmProjects\Test> pip config list[/size]
[size=14px]global.index-url='https://mirrors.aliyun.com/pypi/simple/'[/size]
[size=14px](.venv) PS C:\Users\admin\PycharmProjects\Test> python.exe -m pip install --upgrade pip[/size]
[size=14px]Looking in indexes: 'https://mirrors.aliyun.com/pypi/simple/'[/size]
[size=14px]Requirement already satisfied: pip in c:\users\admin\pycharmprojects\test\.venv\lib\site-packages (23.2.1)[/size]
[size=14px]Collecting pip[/size]
[size=14px] Downloading 'https://mirrors.aliyun.com/pypi/packages/f4/ab/e3c039b5ddba9335bd8f82d599eb310de1d2a2db0411b8d804d507405c74/pip-24.1.1-py3-none-any.whl (1.8 MB)'[/size]
[size=14px] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 349.7 kB/s eta 0:00:00[/size]
[size=14px]Installing collected packages: pip[/size]
[size=14px] Attempting uninstall: pip[/size]
[size=14px] Found existing installation: pip 23.2.1[/size]
[size=14px] Uninstalling pip-23.2.1:[/size]
[size=14px] Successfully uninstalled pip-23.2.1[/size]
[size=14px]Successfully installed pip-24.1.1[/size]
[size=14px](.venv) PS C:\Users\admin\PycharmProjects\Test> [/size]
from:https://blog.csdn.net/qq_21386397/article/details/136964624
|