python执行报no attribute 'HTTPSConnection'

'module' object has no attribute 'HTTPSConnection' 问题>>> import httplib 

>>> conn = httplib.HTTPConnection("192.168.0.1") 
>>> 
>>> conn = httplib.HTTPSConnection('192.168.0.1') 
Traceback (most recent call last): 
File "<stdin>", line 1, in <module> 
AttributeError: 'module' object has no attribute 'HTTPSConnection' 

是由于系统没有安装_ssl module,

yum install openssl openssl-devel后解决,如果是编译安装的python,安装openssl后需重新编译下








你可能感兴趣的:(python,OpenSSL)