python遇到Retry(total=4, connect=None, read=None, redirect=None, status=None)解决方案
生活随笔
收集整理的這篇文章主要介紹了
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)解决方案的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python项目ImportError:
- 下一篇: python基础学习[python编程从