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. 【SSH网上商城项目实战21】从Demo中看易宝支付的流程

         转自: https://blog.csdn.net/eson_15/article/details/51447492 这一节我们先写一个简单点的Demo来测试易宝支付的流程,熟悉这个流程后, ...

  2. mybatis 排坑记录

    1. mapper xml resultMap 中定义 property 时不能出现空格 否则会出现反射错误,找不到 do 对应的 set 方法

  3. java.lang.StackOverflowError: null

    异常信息 java.lang.StackOverflowError: null at sun.misc.FloatingDecimal$BinaryToASCIIBuffer.dtoa(Floatin ...

  4. 【Android】15.0 UI开发(六)——列表控件RecyclerView的网格布局排列实现

    1.0 列表控件RecyclerView的网格布局排列实现,关键词GridLayoutManager. LinearLayoutManager 实现顺序布局 GridLayoutManager 实现网 ...

  5. SignalR实时通信

    /// <summary> /// Message集线器类 /// </summary> [HubName("chathub")] public class ...

  6. 配置文件出错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): <!-- mybatis 配置- ...

  7. 小程序填坑之路(二):cover-view

    https://blog.csdn.net/mr_chen95/article/details/79261987 在一些情况下,我们需要对map.video.canvas.camera这些微信小程序的 ...

  8. php 3des加密 兼容JAVA 多么痛的领悟呀

    最近和别人做接口用到SOCKET TCP/IP方式 其中需要对账号和密码进行3DES加密 对方提供了一个加密比对的软件和JAVA的实现代码 并且给了我们一个长度为32位的密钥 这边需要用PHP来实现! ...

  9. ASP.NET中的身份验证有那些?你当前项目采用什么方式验证请解释

    ASP.NET身份验证模式包括Windows.Forms(窗体).Passport(护照)和None(无). l  Windows身份验证—常结合应用程序自定义身份验证使用使用这种身份验证模式时,AS ...

  10. Python学习---Django的新工程设置模板

    该模板完全可以在创建好新工程后进行部分代码替换 创建app01的  python startapp app01   创建static子目录 settings.py """ ...