解决ImportError: cannot import name HTTPSHandler


/usr/local/python3.5/bin/pip3.5 install flask 的时候遇到了cannot import name HTTPSHandler

 

1. 原因在于openssl,openssl-devel两个文件包未正确安装或者安装顺序出错。

用下来的命令来安装:

yum install openssl -y

yum install openssl-devel -y

 

2. 安装完成后,卸载python3,重新安装:

卸载部分:

步骤1:卸载python rpm -qa|grep python|xargs rpm -e --allmatches --nodeps whereis python|xargs rm -fr 步骤2:卸载yum rpm -qa|grep yum|xargs rpm -e --allmatches --nodeps rm -rf /etc/yum.repos.d/* whereis yum|xargs rm -fr

安装部分:

cd python3.5 ./configure --prefix=/usr/python3.5 make make install

 

安装详细见我另一篇博客

https://www.cnblogs.com/liangmingshen/p/9515285.html

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM