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/
相关推荐
ValhallaCoder7 小时前
hot100-二叉树I
数据结构·python·算法·二叉树
猫头虎8 小时前
如何排查并解决项目启动时报错Error encountered while processing: java.io.IOException: closed 的问题
java·开发语言·jvm·spring boot·python·开源·maven
八零后琐话8 小时前
干货:程序员必备性能分析工具——Arthas火焰图
开发语言·python
青春不朽51210 小时前
Scrapy框架入门指南
python·scrapy
MZ_ZXD00110 小时前
springboot旅游信息管理系统-计算机毕业设计源码21675
java·c++·vue.js·spring boot·python·django·php
全栈老石11 小时前
Python 异步生存手册:给被 JS async/await 宠坏的全栈工程师
后端·python
梨落秋霜11 小时前
Python入门篇【模块/包】
python
阔皮大师12 小时前
INote轻量文本编辑器
java·javascript·python·c#
小法师爱分享12 小时前
StickyNotes,简单便签超实用
java·python