问题描述
利用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安装就可以了
参考链接