centos 安装 python

python2.7安装:
https://www.jianshu.com/p/200c9b9dcac8

注意:
源码安装python后,运行某些模块提示缺少libpython2.7.so
原创运维记事本 最后发布于2016-04-05 11:57:20 阅读数 2301 收藏
展开
源码安装python后,运行某些模块提示缺少libpython2.7.so

造成这个问题的原因是使用
./configure 时没有附加 –enable-shared

编译时使用如下命令编译
./configure --prefix=/usr/local/python27 --enable-shared
make && make install

ln -s /usr/local/python27/lib/libpython2.7.so /usr/lib
ln -s /usr/local/python27/lib/libpython2.7.so.1.0 /usr/lib
ln -s /usr/local/python27/bin/python2.7 /usr/local/bin
/sbin/ldconfig -v

python3安装:
https://blog.csdn.net/jieli_/article/details/87923212

http://www.what21.com/sys/view/liunx_centos_1537971740007.html
CentOS6.5 Liunx安装OpenCV3.4的全过程