Fork me on GitHub

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

 

posted @ 2018-08-22 00:52  暮良文王  阅读(5777)  评论(0编辑  收藏  举报