关于pip命令的几点提醒

pip install xxxxx

总会遇到安装失败,或者下载速度很慢的情况。这是因为从国外安装资源包,造成速度慢,那有咩有国内的源呢,有的。

国内源:

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

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

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

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

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

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

在安装包时加上命令,如使用清华源:

pip install pyspider 

扫描二维码关注公众号,回复: 8778553 查看本文章

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

这样可以从清华镜像中安装pyspider库,很方便的,速度也会快上不少。

如想升级pip,出现下图所示提示:

 告诉我们可以升级pip了,按照提示输入:python -m pip install --upgrade pip   即可,但是往往也很慢

这时我们需要配置镜像,如豆瓣:python -m pip install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com  搞定!

 友情提示:

现在的你是如何截屏的?QQ or  微信??

win10有着自带的截屏方式:win+shift+s  即可截屏,快试试吧!

猜你喜欢

转载自www.cnblogs.com/ZaneEli/p/12228825.html