成功解决Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/xx/: There was a problem confirming

pip安装xxx库出现问题:
比如,xxx是pandas

(py37) user@node01:~$ pip install pandas
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
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:748)'),)': /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:748)'),)': /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:748)'),)': /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:748)'),)': /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:748)'),)': /simple/pandas/
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pandas/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/pandas/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:748)'),)) - skipping
ERROR: Could not find a version that satisfies the requirement pandas
ERROR: No matching distribution found for pandas

解决方式:

pip install xxx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

其中,xxx是你要安装的库

猜你喜欢

转载自blog.csdn.net/ao1886/article/details/111595348