解決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