CentOS 6 自带的 python 是 2.6 的, 下面记录下 CentOS6 源码安装 python 3.5 的过程
- #wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
- #tar xf Python-3.5.2.tgz
- #cd Python-3.5.2
- #./configure --prefix=/usr/local/python3 --enable-shared --enable-loadable-sqlite-extensions
- #make
- #make install
- #echo /usr/local/python3/lib>> /etc/ld.so.conf
- #ldconfig
- #ln -s /usr/local/python3/bin/python3.5 /usr/bin/
安装完成!
来源: http://www.bubuko.com/infodetail-2640125.html