【python】AttributeError: 'module' object has no attribute 'HTTPSConnection'
2017-07-24 14:41
1111 查看
记录一下安装pip的过程。安装过程中,遇到了一些问题:
[c.plm@localhost samba]$ python3.3 get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 17474, in <module>
main()
File "get-pip.py", line 17466, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 17406, in bootstrap
import pip
File "/tmp/tmpru8qrk/pip.zip/pip/__init__.py", line 10, in <module>
File "/tmp/tmpru8qrk/pip.zip/pip/util.py", line 18, in <module>
File "/tmp/tmpru8qrk/pip.zip/pip/_vendor/distlib/version.py", line 14, in <module>
File "/tmp/tmpru8qrk/pip.zip/pip/_vendor/distlib/compat.py", line 66, in <module>
ImportError: cannot import name HTTPSHandler
原因在于openssl,openssl-devel两个文件包未正确安装。用下来的命令来安装:
2
yum install openssl -y
yum install openssl-devel -y
3
安装完成后,重新安装Python:
cd python3.3
./configure
make install
4
再次安装pip正常。
--本篇文章转自:http://jingyan.baidu.com/article/e52e3615aba39640c60c51c3.html
[c.plm@localhost samba]$ python3.3 get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 17474, in <module>
main()
File "get-pip.py", line 17466, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 17406, in bootstrap
import pip
File "/tmp/tmpru8qrk/pip.zip/pip/__init__.py", line 10, in <module>
File "/tmp/tmpru8qrk/pip.zip/pip/util.py", line 18, in <module>
File "/tmp/tmpru8qrk/pip.zip/pip/_vendor/distlib/version.py", line 14, in <module>
File "/tmp/tmpru8qrk/pip.zip/pip/_vendor/distlib/compat.py", line 66, in <module>
ImportError: cannot import name HTTPSHandler
原因在于openssl,openssl-devel两个文件包未正确安装。用下来的命令来安装:
2
yum install openssl -y
yum install openssl-devel -y
3
安装完成后,重新安装Python:
cd python3.3
./configure
make install
4
再次安装pip正常。
--本篇文章转自:http://jingyan.baidu.com/article/e52e3615aba39640c60c51c3.html
相关文章推荐
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- 【python学习笔记(2)】脚本报错"AttributeError: 'module' object has no attribute 'xxx'"解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- python3 报错: AttributeError: 'module' object has no attribute 'urlopen'
- python错误:AttributeError: 'module' object has no attribute 'setdefaultencoding'问题的解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python错误AttributeError: 'module' object has no attribute 'copy'
- AttributeError: 'module' object has no attribute 'AF_INET'处理办法——python
- Python AttributeError: ‘module’ object has no attribute ‘A’
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python AttributeError: 'module' object has no attribute xxxx
- python opencv:AttributeError: 'module' object has no attribute 'cv' FOURCC
- Python:AttributeError: ‘module’ object has no attribute ‘ArgumentParser’
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python 使用sqlite3报错 AttributeError: 'module' object has no attribute 'connect'
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- python运行不了 AttributeError: module object has no attribute getdefaultlocale