当前位置: 首页 > article >正文

Windows 11上pip报‘TLS/SSL connection has been closed (EOF) (_ssl.c:1135)‘的解决方法

这个只是简单记录一下,可能是我用了代理的缘故,即便是把源换成国内的,例如阿里云,也会报错,例如:

pip install matplotlib
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/, https://pypi.org/simple/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /pypi/simple/matplotlib/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /pypi/simple/matplotlib/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /pypi/simple/matplotlib/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /pypi/simple/matplotlib/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /pypi/simple/matplotlib/
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/matplotlib/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.aliyun.com', port=443): Max retries exceeded with url: /pypi/simple/matplotlib/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))) - skipping
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))': /simple/matplotlib/
Could not fetch URL https://pypi.org/simple/matplotlib/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/matplotlib/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))) - skipping
ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)
ERROR: No matching distribution found for matplotlib

感觉可能是因为我开了代理,解决方法也很简单,例如我这里输入:

set http_proxy=http://127.0.0.1:10809
set https_proxy=http://127.0.0.1:10809

然后再运行pip就可以正常安装了。感觉在国内装环境,百分之50的时间都是在处理和网络相关的问题,呵呵呵。

我之前也总结过在Ubuntu上设置代理的不同方法:在Ubuntu 24.04上安装ollama报curl: (28) Failed to connect to github.com port 443的解决方法_ubuntu 24.04 ollama-CSDN博客


http://www.kler.cn/a/306442.html

相关文章:

  • 软件工程师简历(精选篇)
  • 量化交易系统开发-实时行情自动化交易-3.4.2.2.Okex交易数据
  • 阅读2020-2023年《国外军用无人机装备技术发展综述》笔记_技术趋势
  • Spring Boot 中的全局异常处理器
  • 【MySQL】约束
  • Elastic Observability 8.16:增强的 OpenTelemetry 支持、高级日志分析和简化的入门流程
  • MySQL一:在Ubuntu下安装MySQL数据库
  • UAC2.0 麦克风——单通道 USB 麦克风
  • C++部分题目解析
  • 基于ssm+vue+uniapp的智能停车场管理系统小程序
  • Chrome 本地调试webrtc 获取IP是xxx.local
  • SQL进阶技巧:火车票相邻座位预定一起可能情况查询算法 ?
  • 喜报 | 知从科技荣获 “AutoSec 安全之星 - 优秀汽车软件供应链安全方案奖”
  • Qt:Q_GLOBAL_STATIC实现单例(附带单例使用和内存管理)
  • 有了数据中台,是否需要升级到数据飞轮?怎么做才能升级到数据飞轮?
  • 并行编程实战——TBB中的Task
  • C++的内存分布
  • FastAPI与环境变量:实现无缝切换与高效运维
  • Python操作MySQL
  • 常见生成模型有哪些?生成模型前后存在依赖关系,怎么处理更合适
  • 二分算法——优选算法
  • 排队免单模式小程序开发
  • Harmony OS DevEco Studio低代码开发流程 - HarmonyOS开发自学5
  • 【Linux进程】Linux Shell编程实战:构建简易脚本示例与技巧详解
  • Unity3D 小案例 像素贪吃蛇 02 蛇的觅食
  • Oracle EBS中AR模块的财务流程概览