我系统是ubuntu14.04,默认python版本有点低,就动手升级,去官网下好了安装包,按照网上的方法编译安装好了,测试能用,但无法安装pip,网上查了,说是ssl没装,装好openssl后,重新编译,make时出错了:
gcc -pthread -Wl,-rpath /usr/local/lib -Xlinker -export-dynamic -o python \
Modules/python.o \
libpython2.7.a -lpthread -ldl -lutil -L/usr/lib -lssl -lcrypto -lm
libpython2.7.a(posixmodule.o): In function `posix_tmpnam':
/home/xx/Python-2.7.10/./Modules/posixmodule.c:7631: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
libpython2.7.a(posixmodule.o): In function `posix_tempnam':
/home/xx/Python-2.7.10/./Modules/posixmodule.c:7578: warning: the use of `tempnam' is dangerous, better use `mkstemp'
libpython2.7.a(_ssl.o): In function `_set_alpn_protocols':
/home/xx/Python-2.7.10/./Modules/_ssl.c:2266: undefine