欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

pip安装库提示超时-解决办法

程序员文章站 2023-01-25 16:35:29
重新安装python,把之前压缩版的卸载了,所以涉及第三方库也要重新安装。在cmd中使用pip install xxx命令安装第三方库时,报错提示超时。解决方法:更换下载源:清华:https://pypi.tuna.tsinghua.edu.cn/simple/阿里云:http://mirrors.aliyun.com/pypi/simple/豆瓣:http://pypi.douban.com/simple/如下载pandas:在后面加上 -i 加上网址 就可以了,而且速度超快。pip...

重新安装python,把之前压缩版的卸载了,所以涉及第三方库也要重新安装。
在cmd中使用pip install xxx命令安装第三方库时,报错提示超时。
解决方法:更换下载源:

清华:https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云:http://mirrors.aliyun.com/pypi/simple/
豆瓣:http://pypi.douban.com/simple/

如下载numpy:在后面加上 -i 加上网址 就可以了,而且速度超快。
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple/
顺便记录一下当时卸载python前卸载pip的命令,以及安装好python后,升级pip的命令:

pip uninstall xxx 卸载xxx库
python -m pip uninstall pip 卸载pip
python -m pip install --upgrade pip 升级pip版本

本文地址:https://blog.csdn.net/qq_40178216/article/details/107578992