urllib2.URLError:

python 出现'module' object has no attribute 'HTTPSHandler' 错误,是因为你编译python的时候没有把ssl模块编译进去,重新编译安装python,并把ssl模块包含进去就可以了

cd python源码目录/Modules
vi Setup.dst
找到

# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
SSL=/usr/local/ssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto

把注释去掉
cd ..
make
mak install
就可以了

你可能感兴趣的:(urllib2.URLError: )