pip install 报SSL异常和timeout异常
在安装pip3 install virtualenv时报了SSL异常
如图
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting virtualenv
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/virtualenv/
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/virtualenv/
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/virtualenv/
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/virtualenv/
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/virtualenv/
Could not fetch URL https://pypi.org/simple/virtualenv/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/virtualenv/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Could not find a version that satisfies the requirement virtualenv (from versions: )
No matching distribution found for virtualenv
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
是因为在./configure过程中,如果没有加上–with-ssl参数,默认安装的软件涉及到ssl的功能不可用,刚好pip3过程需要ssl模块,而由于没有指定,所以该功能不可用。
解決办法,安装 openssl-devel:yum -y install openssl-devel
再次安装,还是报错
重新编译python,到准备的python的安装包目录
[root@localhost Python-3.7.0]# ./configure --with-ssl
[root@localhost Python-3.7.0]# make && make install
再次执行安装:pip3 install virtualenv
timeout异常
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
在下载python库的时候,由于国内网络原因,python包的下载速度非常慢,查看pip 文档,只要在 pip的时候控制超时即可, 具体参数为 --default-timeout=100, 后面的时间可以自己指定。
pip install 报SSL异常和timeout异常的更多相关文章
- pip install报错Can't roll back cryptography; was not uninstalled
当使用pip install或者pip install --upgrade报错 Can't roll back cryptography; was not uninstalled 可以进行以下的尝试: ...
- python pip install 报错TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' Command "python setup.py egg_info" failed with error code 1 in
pip install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl ...
- pip install 报错 TypeError: 'module' object is not callable
$ pip install filetype Traceback (most recent call last): File "/usr/local/bin/pip2", line ...
- pip install 报错原因
1. 要在~/.pip/pip.conf中添加源的地址. 2. 在运行pip install 命令的时候加上sudo -H
- pip install 报错
问题描述,在使用pip安装django相关软件包时,提示错误如下: [root@test4 install]# pip install django==1.6 Downloading/unpackin ...
- pip install报错:RuntimeError: Python version >= 3.5 required
由于pip官方的不作为,现如今python2(以及某些低版本python3)配套的pip,已经没法正常的安装pypi包了. 例如需要用到的一套PyCaffe的代码,是基于Python2的,于是用min ...
- pip install 报错 Could not fetch URL
Could not fetch URL https://pypi.python.org/simple/xxx/: There was a problem confirming the ssl cert ...
- 【Linux】CentOS6上安装Python3.7(config、make、make install)及“No module named '_ctypes'”/pip install时“ssl module in Python is not available.”的解决
1.下载安装包 https://www.python.org/ftp/python/ 该目录下选择所需要的版本进行下载.解压. wget https://www.python.org/ftp/pyth ...
- pip install 报错UnicodeDecodeError: 'ascii' codec can't decode byte
2017-03-23 报错原因: pip安装Python包会加载我的用户目录,我的用户目录恰好是中文的,ascii不能编码. 解决办法: python目录 Python27\Lib\site-pack ...
随机推荐
- Windows禅道环境部署
1. 禅道下载地址,下载解压 http://www.zentao.net/download/80081.html 一键安装包根据本机系统做相应版本下载 2. 解压完打开文件夹xampp ...
- 一波骚操作,我把 SQL 执行效率提高了 10,000,000 倍!
作者:风过无痕-唐 http://www.cnblogs.com/tangyanbo/p/4462734.html 场景 我用的数据库是mysql5.6,下面简单的介绍下场景 课程表: create ...
- let/const及块级作用域
本系列是在平时阅读.学习.实际项目中有关于es6中的新特性.用发的简单总结,目的是记录以备日后温习:本系列预计包含let/const.箭头函数.解构.常用新增方法.Symbol.Set&Map ...
- bfs(最短路径)
http://poj.org/problem?id=3278 Catch That Cow Time Limit: 2000MS Memory Limit: 65536K Total Submis ...
- 2019牛客暑期多校训练营(第二场) - H - Second Large Rectangle - dp
https://ac.nowcoder.com/acm/contest/882/H 正确的办法:dp1[i][j]表示以i,j为底的矩形的高.得到dp1之后,dp2[i][j]表示以dp1[i][j] ...
- spring(五):spring中Aware接口的使用
spring中自定义组件需要使用spring的底层组件时,可以通过自定义组件实现相关XxxAware接口,重写其中的方法进而实现 例如:自定义一个组件,该组件中需要使用ApplicationConte ...
- AJAX —— JSON 字符串 与 JSON 对象
一.JSON 字符串转 JSON 对象 ----> JSON.parse(JString); 1 // JSON 字符串转 JSON 对象 ----> JSON.parse(JString ...
- surpace pro 检测维修记录
1.大陆不在全球联保范围内. 2.不要升级系统(win 10 1709)容易键盘失去反应. 3.不要乱安装系统,官方有回复镜像包,记住系列号, 4.大陆没有维修的点,有问题着官方服务, 5.uefi设 ...
- MySQL --13 主从复制
目录 一.主从复制简介 二.主从复制原理 三.主从复制搭建实战 四.主从复制基本故障处理 五.延时从库 企业案例: 模拟环境 一.主从复制简介 复制是 MySQL 的一项功能,允许服务器将更改从一个实 ...
- rabbiitmq非阻塞调用
https://blog.csdn.net/panxianzhan/article/details/50755409 https://blog.csdn.net/u013946356/article/ ...