cd python源码目录/Modules
vi Setup.dist
找到
# 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 ..
./configure --with-zlib
make
make install
就可以了
http://www.xinotes.net/notes/note/628/
fatal error: openssl/sha.h: No such file or directory 解决方案
http://blog.csdn.net/xxxxxx91116/article/details/7927520
Centos 安装
yum install openssl-devel