python安装第三方包异常【SSLEOFError】、[SSL: CERTIFICATE_VERIFY_FAILED]

Could not fetch URL https://pypi.org/simple/xxxx/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/xxxx

l/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),)) - skipping

ERROR: Could not find a version that satisfies the requirement xxxx (from versions: none)

ERROR: No matching distribution found for xxxx

原因:

python高版本需要验证ssl,可以添加--trusted-host 来解决,所有host都得--trusted-host

解决:

bash 复制代码
# 这里用的国内清华镜像源,注意安装包xxxx需要替换为你要安装的第三方包
pip --trusted-host pypi.python.org --trusted-host pypi.tuna.tsinghua.edu.cn install xxxx -i https://pypi.tuna.tsinghua.edu.cn/simple/
相关推荐
卷无止境6 分钟前
AI编程时代,代码复杂性正在悄悄失控
后端·python
开源量化GO14 分钟前
看到“2026年 Python 与 API”时,用示例和拆解看清关系
人工智能·python
高洁0118 分钟前
大模型是怎么“学会“的:预训练、微调、对齐三段论
python·深度学习·transformer·知识图谱·tornado
529宝宝起名网21 分钟前
用 Python 开发名字五行八字匹配工具:从八字排盘到喜用神起名的全流程实现
python
砚底藏山河42 分钟前
并发与限频工程:把20只的2秒压到0.5秒不封号(魔码量化实战 #03)
java·开发语言·数据库·python·金融
论文复现现场1 小时前
本地 PyTorch 训练 OOM,第一次租 RTX 4090 云 GPU 怎么迁移项目?从环境检查到 100 Step 跑通
人工智能·pytorch·python·深度学习·cuda
会飞的拖把1 小时前
Python 多任务编程:并发、进程、线程与线程安全详解
开发语言·python
2601_956319882 小时前
看到“2026年量化学习”时,交易想法要先拆成条件和动作
人工智能·python
大模型码小白2 小时前
Harness Engineering 驾驭工程:从使用到项目实战
大数据·数据库·人工智能·python·spring
程序员小远2 小时前
自动化测试用例编写实例详解
自动化测试·软件测试·python·selenium·测试工具·职场和发展·测试用例