pip安装常出现的ERROR解决方案

  • Post author:
  • Post category:其他



WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.


ERROR: Could not find a version that satisfies the requirement novas (from versions: none)


原因:

python国内网络不稳定,直接导致报错。因此我们常用镜像源来解决此问题

清华大学:https://pypi.tuna.tsinghua.edu.cn/simple

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

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


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


安装配置

解决方法:

1.创建~/.pip/pip.conf

[root@localhost ~]# mkdir ~/.pip
[root@localhost ~]# cd ~/.pip
[root@localhost .pip]# vim pip.conf

2.配置pip.conf

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
disable-pip-version-check = true
timeout = 120
[install]
trusted-host=mirrors.aliyun.com
ignore-installed = true
no-dependencies = yes

3.保存退出,用pip下载你所需要的资源



版权声明:本文为Emily_ASL原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。