Linux pip 安装模块时,一直黄字错误:Could not find a version that satisfies the requirement

参考原文:https://blog.csdn.net/u012592062/article/details/51966649

这时我们用国内的镜像源来加速

pip install 包名-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

--trusted-host pypi.douban.com 这是为了获得ssl证书的认证

执行成功

每次都要输入这么一大长串,不方便也不容易记忆,可以这样来配置,一劳永逸

1 在当前用户目录下创建.pip文件夹

mkdir ~/.pip

2 cd ~/.pip 创建文件pip.conf

vi pip config

 

 

好了,这下就可以放心的使用 pip install 包名  了

posted @ 2018-07-16 14:52  持&恒  阅读(1068)  评论(0编辑  收藏  举报