pip安装使用镜像+ pip安装解决use cached

问题:使用国内镜像

使用镜像的参考链接:

http://topmanopensource.iteye.com/blog/2004853

举例:

pip install  -i http://pypi.hustunique.org/simple --trusted-host  pypi.hustunique.org  -r requirements.txt

镜像源为:http://pypi.hustunique.org/ 

注意:最后面加上了 simple

需要安装的软件都在requirements.txt 文件中

 

问题:use cached

 

有时侯,安装会出现下面的情况,特别是你不是第一次安装的时候,

 

『Collecting asn1crypto==0.22.0 (from -r .\requirements.txt(line 1))

    Using cached asn1crypto-o.22.0-py2.py3-none-any.whl』

 

解决方法:

 

可以参考链接:https://stackoverflow.com/questions/9510474/removing-pips-cache

 

pip install  -i http://pypi.sdutlinux.org/simple --trusted-host pypi.sdutlinux.org -r requirements.txt --no-cache-dir

加上--no-cache-dir的命令就可以了

 

posted @ 2018-01-12 19:57  youyouhuo  阅读(1036)  评论(0编辑  收藏  举报