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下载你所需要的资源

当Python的pip由于网络问题无法正常下载资源时,可以采用更换镜像源的方式来解决。本文提供了清华大学、阿里云和豆瓣的镜像源地址,并详细介绍了如何配置~/.pip/pip.conf文件,包括设置index-url、timeout、trusted-host等参数,以确保能够顺利通过国内镜像源下载所需的Python包。
1709

被折叠的 条评论
为什么被折叠?



