新的Pycharm版本在下载库并安装时,经常会出现如题的红色错误。

(目前使用的Pycharm版本为 PyCharm 2020.1.1 (Professional Edition) 

网上博客大多解决不好,特此记录。

1、在查找第三方库的界面,找到 MANAGE REPOSITORIES ,删除默认源,并添加国内如阿里云源或豆瓣源等:

https://mirrors.aliyun.com/pypi/simple/
https://pypi.douban.com/simple/

当然其他第三方源,如豆瓣源或清华源都是可以的。

2、特别注意,网上搜索的源URL很多都是http协议,而不是https。如果遇到如下黄字警告,注意URL修改为https://

WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this reposi
tory 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'.

 

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐