找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 564|回复: 0

pip无法从清华源下载,ERROR: HTTP error 403 while getting https://pypi.tuna.tsing

[复制链接]

2万

主题

162

回帖

18万

积分

管理员

积分
184954
发表于 2024-7-3 06:45:25 | 显示全部楼层 |阅读模式 IP:山东省临沂市 联通

登录后更精彩...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)

2.png


解决方法

更换pip默认源为阿里源


[] 纯文本查看 复制代码
pip config set global.index-url 'https://mirrors.aliyun.com/pypi/simple/'


1.png
查看默认源

[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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|哩布大模型|Civitai大模型|IP定位|图反推|站长素材|deepseek|即梦视频|阿狗工具|花瓣网|pinterest|php手册|宝塔文档|CyberChef|猫捉鱼铃|手机版|小黑屋|下载狗|IPS|在线工具|分享屋 ( 鲁ICP备2021028754号 )

GMT+8, 2025-5-10 04:50

Powered by 分享屋 X3.5 Licensed

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表