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

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

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

猜你喜欢

转载自www.cnblogs.com/lfxiao/p/9317641.html