上一篇文章讲了如何在新版的PyCharm中添加第三方PIP源,但是添加以后阿里云的源以后又再遇到了两个问题
因为链接不是ssl而报错
错误提示如下:
The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. Could not find a version that satisfies the requirement proxy (from versions: ) No matching distribution found for proxy
解决方案:使用https链接
http://mirrors.aliyun.com/pypi/simple/
改成https://mirrors.aliyun.com/pypi/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:852)'),)': /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:852)'),)': /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:852)'),)': /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:852)'),)': /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:852)'),)': /simple/pandas/
这个问题搜索了好久终于找到了原因,有大神说就是因为启用了科学上网工具,必须关闭以后才能解决问题,即便是direct模式都不可以。
解决方案:关闭科学上网工具
也有大神提示说是urllib新版本的原因,直接退回urllib老版本1.23可以解决这个问题
pip3 install urllib3==1.23
就这样,两个奇奇怪怪的问题就解决了。
Comments | NOTHING