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
Downloading http://mirrors.aliyun.com/pypi/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl (57kB)
100% |████████████████████████████████| 61kB 695kB/s
Collecting urllib3<1.25,>=1.21.1 (from requests)
Downloading http://mirrors.aliyun.com/pypi/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl (118kB)
100% |████████████████████████████████| 122kB 1.3MB/s
Collecting idna<2.9,>=2.5 (from requests)
Downloading http://mirrors.aliyun.com/pypi/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
100% |████████████████████████████████| 61kB 1.7MB/s
Collecting certifi>=2017.4.17 (from requests)
Downloading http://mirrors.aliyun.com/pypi/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl (154kB)
100% |████████████████████████████████| 163kB 2.3MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Downloading http://mirrors.aliyun.com/pypi/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 1.3MB/s
Installing collected packages: urllib3, idna, certifi, chardet, requests
Successfully installed certifi-2018.11.29 chardet-3.0.4 idna-2.8 requests-2.21.0 urllib3-1.24.1

---------------------

解决Linux 安装python3 .5 解决pip 安装无法成功问题ssl安全拦截无法pip安装库问题的更多相关文章

  1. Linux非root安装Python3以及解决SSL问题

    说明 接上一篇. [Linux]非root安装Python3及其包管理 上一篇虽然成功安装了Python3及一些常用的模块,但因为一直装不上SSL模块,导致一些包无法安装,尝试了不少方法都失败了(网上 ...

  2. centOS安装python3 以及解决 导入ssl包出错的问题

    参考: https://www.cnblogs.com/mqxs/p/9103031.html https://www.cnblogs.com/cerutodog/p/9908574.html 确认环 ...

  3. 在新安装的Centos中安装python3.7 解决pip和yum问题

    首先要先安装依赖包: yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-deve ...

  4. 解决Linux下Svn检出Windows SVN服务器上项目SSL handshake failed: SSL error: Key usage violation in certificate has been detected.

    在Linux上检出windows SVN服务器上项目时出现了SSL handshake failed: SSL error: Key usage violation in certificate ha ...

  5. 【Python】CentOs7 Python3安装Openssl以及解决ssl问题

    一.安装OpenssL 1.下载的压缩包放在根目录 wget http://www.openssl.org/source/openssl-1.0.2j.tar.gz 2.在文件夹下解压缩,得到open ...

  6. CentOs7 Python3安装Openssl以及解决ssl问题

    一.安装OpenssL 1.下载的压缩包放在根目录 wget http://www.openssl.org/source/openssl-1.0.2j.tar.gz 2.在文件夹下解压缩,得到open ...

  7. linux 安装python3 date更新

    http://linux.51yip.com/ ntpdate -u ntp.aliyun.com   更新时间 centos 默认是有 python的,是2.7.5的 重启网络的命令  -- sys ...

  8. 【Linux】非root安装Python3及其包管理

    1. Python 3.8.1安装 源码安装常规操作: wget -c https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz tar -xv ...

  9. Linux中安装python3

    [centos7中安装python3]http://blog.csdn.net/wjqwinn/article/details/75633714 (一)安装python3前的准备工作1.修改文件中第一 ...

随机推荐

  1. JMX 远程监控 Linux tomcat 功能实现

    作者远程服务器操作系统 CentOS 7.0, tomcat 版本 7.0 1. Linux tomcat 配置 1.1 catalina_opt 配置 可以在 catalina.sh 文件中添加如下 ...

  2. json格式对象大括号中不能把键改为变量问题

    今天遇到了一个往json中写入变量的问题,下面代码是错误的写法 document.querySelector(".box").onclick = function(){ // 移动 ...

  3. CNN中tensorboard数据可视化

    1.CNN_my_test.py import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data ...

  4. Angular面试题二

    十一.ng-repeat迭代数组的时候,如果数组中有相同值,会有什么问题,如何解决? 会提示 Duplicates in a repeater are not allowed. 加 track by ...

  5. ESP8266调试记录

    1.引脚图:使用STM32F103ZET6芯片的串口1  PA9-TX //PA10-RX(该串口挂载到APB2总线时钟)然后分别连接模块的RX和TX,供电使用3.3v(供电一定要稳)但不能超过5v ...

  6. 【转】fatal error C1189: #error : missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS

    转自:http://blog.csdn.net/friendan/article/details/46576699 fatal error C1189: #error :  missing -D__S ...

  7. Java基础之基本数据类型的包装类型

    Java的基本数据类型的包装数据类型有多种: int Integer,short Short,boolean Boolean,float Float,double Double等等. Java包装类数 ...

  8. CSS盒子模型中()是透明的,这部分可以显示背景()

    CSS盒子模型中()是透明的,这部分可以显示背景() border margin padding content 我的理解: ·       Margin(外边距) - 清除边框外的区域,外边距是透明 ...

  9. Django 的视图层

    什么是视图: 之前我们也了解了urls路由 那么路由的主要作用是决定你下一步走哪个视图函数 ,视图就是用来存放一个个的函数的python文件,主要存储的函数就是你Django主要的流程的控制 都存放在 ...

  10. 使用iCarousel的旋转木马效果请求图片

    使用iCarousel的旋转木马效果请求图片 https://github.com/nicklockwood/iCarousel 先看看效果: 源码如下: // // RootViewControll ...