Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2279613
  • 博文数量: 297
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2200
  • 用 户 组: 普通用户
  • 注册时间: 2014-03-31 14:30
个人简介

自己慢慢积累。

文章分类

全部博文(297)

分类: Python/Ruby

2019-05-10 15:26:18

linux下 安装Pip后,使用Pip安装包时报错:

点击(此处)折叠或打开

  1. -bash-4.1$ pip install requests --trusted-host mirrors.aliyun.com
  2. WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
  3. Collecting requests
  4.   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/
  5.   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/
  6.   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/
  7.   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/
  8.   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/
  9.   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
  10.   ERROR: Could not find a version that satisfies the requirement requests (from versions: none)
  11. ERROR: No matching distribution found for requests
  12. WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
  13. 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.
用过各种方法都不行,添加参数后成功:

点击(此处)折叠或打开

  1. pip install pymysql --trusted-host mirrors.aliyun.com --index-url http://mirrors.aliyun.com/pypi/simple/


阅读(2301) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~