python环境:python 3.8

报错信息:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pip3
  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/pip3/
  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/pip3/
  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/pip3/
  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/pip3/
  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/pip3/
  Could not fetch URL https://pypi.org/simple/pip3/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip3/ (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 pip3 (from versions: none)
ERROR: No matching distribution found for pip3
WARNING: 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

安装python 3.8的方法:centos安装httprunner方法

执行命令:

#pip install httprunner

报错:使用pip 命令失败,见顶部“报错信息”

解决办法:升级openssl

1、查看openssl版本

# openssl version

OpenSSL 1.0.1e-fips 11 Feb 2013

# cat /etc/issue               
CentOS release 6.6 (Final)
Kernel \r on an \m

原因:系统版本centos6.6,其中openssl的版本为OpenSSL 1.0.1e-fips 11 Feb 2013,而python3.8需要的openssl的版本为1.0.2或者1.1.x,需要对openssl进行升级,并重新编译python3.8.0。

注意:yum 安装的openssl 版本都比较低。
2、下载openssl
#wget https://www.openssl.org/source/openssl-1.1.1a.tar.gz
#tar -zxvf openssl-1.1.1a.tar.gz
#cd openssl-1.1.1a
3、编译安装
#./config --prefix=/usr/local/openssl no-zlib #不需要zlib
#make && make install
4、备份原配置
#mv /usr/bin/openssl /usr/bin/openssl.bak
#mv /usr/include/openssl/ /usr/include/openssl.bak
5、新版配置
#ln -s /usr/local/openssl/include/openssl /usr/include/openssl
#ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/local/lib64/libssl.so
#ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
6、修改系统配置
1)写入openssl库文件的搜索路径
#echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
2)使修改后的/etc/ld.so.conf生效
#ldconfig -v
7、查看openssl版本

# openssl version

OpenSSL 1.1.1a  20 Nov 2018

8、重新安装python

进入python解压缩文件夹,执行
#./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl
#make
#make install

------------------------------------------------------Tanwheey--------------------------------------------------

爱生活,爱工作。

centos解决Could not find a version that satisfies the requirement pip3 (from versions: none)及No matching distribution found for pip3问题的更多相关文章

  1. python Could not find a version that satisfies the requirement pymysql (from versions: none) ERROR: No matching distribution found for pymysql

    使用pip安装pymysql出错;Could not find a version that satisfies the requirement cryptography (from pymysql) ...

  2. Python之使用pip安装三方库Error:Could not find a version that satisfies the requirement <package>(from versions: none),No matching distribution found for <package>

    出现多次使用pip安装包时提示以下报错: ERROR: Could not find a version that satisfies the requirement <package> ...

  3. 树莓派pip安装opencv报错,Could not find a version that satisfies the requirement cv2 (from versions: )No matching distribution found for cv2

    前言 我在使用pip install opencv-python 时报错 Could not find a version that satisfies the requirement opencv ...

  4. Could not find a version that satisfies the requirement win32api (from versions: ) No matching distribution found for win32api

    pip install win32api pip install pywin32 都会提示错误,如下: Could not find a version that satisfies the requ ...

  5. [报错处理]Could not find a version that satisfies the requirement xml (from versions)

    安装xml库发生报错 pip3 install xml Collecting xml Could not find a version that satisfies the requirement x ...

  6. pip安装python包出错:Could not find a version that satisfies the requirement skimage (from versions: )

    今天用pip安装skimage时报错: 这是因为网络的问题,需要使用国内的镜像源来加速,比如豆瓣源 命令改为: pip install scikit-image -i http://pypi.doub ...

  7. Python出现Could not find a version that satisfies the requirement openpyxl (from versions: )

    一.环境使用python3.7时,用pip安装openpyxl出现如下错误: 系统环境:windows10家庭版Python版本:python3.7.1IDE:sublime_text 3二. 解决方 ...

  8. Windows下Pycharm安装Tensorflow:ERROR: Could not find a version that satisfies the requirement tensorflow

    今天在Windows下通过Pycharm安装Tensorflow时遇到两个问题: 使用pip安装其实原理都相同,只不过Pycharm是图形化的过程! 1.由于使用国外源总是导致Timeout 解决方法 ...

  9. 全网最详细的用pip安装****模块报错:Could not find a version that satisfies the requirement ****(from version:) No matching distribution found for ****的解决办法(图文详解)

    不多说,直接上干货! 问题详情 这个问题,很普遍.如我这里想实现,Windows下Anaconda2 / Anaconda3里正确下载安装用来向微信好友发送消息的itchat库. 见,我撰写的 全网最 ...

随机推荐

  1. USB-TTL

  2. Python---进阶---文件操作---获取文件夹下所有文件的数量和大小

    一.####编写一个程序,统计当前目录下每个文件类型的文件数 ####思路: - 打开当前的文件夹 - 获取到当前文件夹下面所有的文件 - 处理我们当前的文件夹下面可能有文件夹的情况(也打印出来) - ...

  3. SweetAler弹框插件与分页器插件

    目录 SweetAlert插件 自定义分页器 使用Django向数据库批量插入数据 自定义分页器的思路 自定义分页器组件 SweetAlert插件 sweetalert是一款基于Bootstrap的专 ...

  4. 尝试用了一哈wepy框架的感想

    恶心死我, 1 在项目里出现了中文乱码(utf-8在wpy文件里有中文和注释--编译后就转化成乱码, 把代码拷在另外的项目里,(该项目没有中文乱码现象,)编译出来就出现中文乱码, 然后我再在所拷的代码 ...

  5. Leetcode 16. 3Sum Closest(指针搜索)

    16. 3Sum Closest Medium 131696FavoriteShare Given an array nums of n integers and an integer target, ...

  6. 【LOJ6225&网络流24题】火星探险问题(费用流)

    题意: 思路: [问题分析] 最大费用最大流问题. [建模方法] 把网格中每个位置拆分成网络中两个节点<i.a>,<i.b>,建立附加源S汇T. 1.对于每个顶点i,j为i东边 ...

  7. Elasticsearch的聚合操作

    ES的聚合: Metrics 简单的对过滤出来的数据集进行avg,max等操作,是一个单一的数值. bucket 可以理解为将过滤出来的数据集按条件分成多个小数据集,然后Metrics会分别作用在这些 ...

  8. bat语法

    注释 :: 注释无回显 rem 注释有回显 关闭和开启回显 :: 关闭回显 @echo off echo abc :: 开启回显 echo on echo 查看命令帮助说明 rd /? 目录操作 创建 ...

  9. 笨办法学Python(learn python the hard way)--练习程序42

    下面是练习42,基于python3 #ex42.py 1 class TheThing(object): 2 #__init__为class设置内部变量的方式,正常情况下函数内的变量与外部没有关联,但 ...

  10. Delphi XE2 之 FireMonkey 入门(5) - TAlphaColor

    不是 TColor, 是 TAlphaColor 了. TAlphaColor = type Cardinal; 还是一个整数. 四个字节分别是: AA RR GG BB(透明度.红.绿.蓝); 这和 ...