python3升级后pip提示TLS/SSL错误问题

 

python升级到3.7.5后,使用pip安装时候报错如下:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Looking in indexes: https://pypi.douban.com/simple/
Collecting ncclient   

解决方案:

1、安装zlib和openssl,详见:https://www.cnblogs.com/luckjinyan/p/13124422.html

2、修改Python安装包源文件:去掉选中白色部分前面的注释

vi ./Modules/Setup.dist

 

 3、编译安装python:./configure prefix=/usr/local/python3

 

posted @ 2020-08-31 22:53  靠谱的提莫  阅读(17505)  评论(0编辑  收藏  举报