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/

感谢大家的关注与支持~

相关推荐
techpupil8 分钟前
IDEA基础配置及开发基础插件
java·ide·intellij-idea
赵庆明老师8 分钟前
Android Studio Google源代理配置
android·ide·android studio
前端精髓24 分钟前
动态选择工具
python·langchain
weixin199701080161 小时前
官方授权通道和灰色爬虫,做数据服务该选哪条路(附 python 源码)
c++·爬虫·python
Ryan-Zhong1 小时前
数字人口播视频 API 实战:Python 跑通模板合成、异步轮询与批量出片
开发语言·python·音视频
quantdash_cc1 小时前
个人开发者用 QuantDash 读取港股行情:00700.HK 的 Python 函数封装与校验实践
python·数据分析·pandas·量化交易·股票数据·quantdash
fengci.1 小时前
CTF2困难部分
开发语言·网络·python·安全·php
小小张说故事2 小时前
Python 的 0.1 + 0.2 为什么不等于 0.3?拆开 IEEE 754 与那串死循环小数
后端·python
LK_072 小时前
【Agent】工具调用的安全边界:从模型输出到程序执行
人工智能·笔记·python·agent