PyCharm 安装库时显示连接超时

在setting->python Interpreter 中用"+" 安装库时,出现一个弹窗,提示信息如下:

复制代码
Error updating package list: Connect timed out

通过查阅资料,发现是镜像源的问题,具体的解决方案如下:

1. 更新一下pip版本

pip install --upgrade pip

2. 用pip安装库时加上源的地址

pip install 包名 -i https://pypi.tuna.tsinghua.edu.cn/simple/

我这里时安装的pandas库,所以我终端里输入的是:

pip install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple/

运行结果如下:

此时pandas库已经安装成功了! !终于解决了!!!我还以为是http 代理的问题(我是设置了不使用代理),但其实并不是,我修改完之后没什么用。。

注:

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里:http://mirrors.aliyun.com/pypi/simple/

豆瓣:http://pypi.douban.com/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

中国科学技术大学:http://pypi.mirrors.ustc.edu.cn/

感谢大家的关注与支持~

相关推荐
李剑一2 小时前
Python学习笔记3
python
luod2 小时前
Python包
python
Mr Lee_2 小时前
Smali 文件生成dex装箱算法整合
开发语言·python·算法
电饭叔2 小时前
《python语言程序设计》2018版--第8章14题利用字符串输入作为一个信用卡号之一(Luhn算法解释)
android·java·python
小女孩真可爱3 小时前
大模型学习记录(八)---------RAG评估
linux·人工智能·python
刘晓倩3 小时前
Python3的Sequence
开发语言·python
ZhengEnCi3 小时前
一次多线程同步问题的排查:从 thread_count 到 thread.join() 的踩坑之旅
python·网络协议·tcp/ip
ULTRA??3 小时前
ROS Action 完整示例(AI辅助):客户端发目标 + 服务器接参数(lambda 替代 boost::bind)
c++·python
free-elcmacom3 小时前
用Python玩转GAN:让AI学会“造假”的艺术
人工智能·python·机器学习
黎相思3 小时前
环境搭建
ide