当前位置: 移动技术网 > IT编程>脚本编程>Python > pip安装库提示超时-解决办法

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

2020年07月26日  | 移动技术网IT编程  | 我要评论
重新安装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

如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网