python遇到Retry(total=4, connect=None, read=None, redirect=None, status=None)解决方案
2021/4/18 12:25:15
本文主要是介绍python遇到Retry(total=4, connect=None, read=None, redirect=None, status=None)解决方案,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
文章目录
- 解决方法
- 遇到的问题
- 参考
解决方法
这个问题的原因是pip源太慢,我们可以用国内的源,比如豆瓣,这里用的是豆瓣的源。
输入下面的代码可以解决:
pip install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
这个问题的模板如下:
pip install 想安装的包 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
其实,我们用pip下载的原理也就是连接到python的官方源,然后下载到本地。后者用的是国内的镜像源,加快速度。
遇到的问题
PS D:\user\文档\python\python_work\data_visualization> pip install pandas Defaulting to user installation because normal site-packages is not writeable WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/pandas/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/pandas/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/pandas/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/pandas/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))': /simple/pandas/ Could not fetch URL https://pypi.org/simple/pandas/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pandas/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))) - skipping ERROR: Could not find a version that satisfies the requirement pandas ERROR: No matching distribution found for pandas
参考
[1]python项目ImportError: Plotly express requires pandas to be installed.解决方案
[2]国内的pythoner强烈建议使用豆瓣的pypi源 zz
这篇关于python遇到Retry(total=4, connect=None, read=None, redirect=None, status=None)解决方案的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-24Python编程基础详解
- 2024-11-21Python编程基础教程
- 2024-11-20Python编程基础与实践
- 2024-11-20Python编程基础与高级应用
- 2024-11-19Python 基础编程教程
- 2024-11-19Python基础入门教程
- 2024-11-17在FastAPI项目中添加一个生产级别的数据库——本地环境搭建指南
- 2024-11-16`PyMuPDF4LLM`:提取PDF数据的神器
- 2024-11-16四种数据科学Web界面框架快速对比:Rio、Reflex、Streamlit和Plotly Dash
- 2024-11-14获取参数学习:Python编程入门教程