linux下 安装Pip后,使用Pip安装包时报错:
-
-bash-4.1$ pip install requests --trusted-host mirrors.aliyun.com
-
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
-
Collecting requests
-
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/requests/
-
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/requests/
-
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/requests/
-
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/requests/
-
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/requests/
-
Could not fetch URL There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
-
ERROR: Could not find a version that satisfies the requirement requests (from versions: none)
-
ERROR: No matching distribution found for requests
-
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
-
Could not fetch URL 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.
用过各种方法都不行,添加参数后成功:
-
pip install pymysql --trusted-host mirrors.aliyun.com --index-url http://mirrors.aliyun.com/pypi/simple/
阅读(2273) | 评论(0) | 转发(0) |