pip is configured with locations that require TLS/SSL,
however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/:
There was a problem confirming the ssl certificate:
HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with
url: /simple/pip/
(Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
在~/.pip/pip.conf文件中添加或修改
在root目录下新建.pip目录,
cd root
mkdir .pip
cd .pip
touch pip.conf
vi pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/ #可以手工指定是http的或者https的
[install]
trusted-host=mirrors.aliyun.com
pip3 install requests
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting requests
Download