centos6 中 pip3安装No matching distribution found for xxx 问题

问题描述

利用docker安装的pip3(版本3.6)安装python模块会出现No matching distribution found for xxx的ERROR,在这之前还有一段WARNINGpip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
在这里插入图片描述

解决方案

修改python安装包源文件

  • 进入python安装包的路径
cd /home/Python-3.6.0
  • 修改dist文件,将反白部分注释解除并保存退出
vim ./Modules/Setup.dist

在这里插入图片描述

  • 重新编译python
./configure --prefix=/usr/local/python36 && make && make install
  • 再次进行pip安装就可以了
    在这里插入图片描述
    参考链接

Guess you like

Origin blog.csdn.net/weixin_46248273/article/details/119610650