#CentOS7安裝Python3.4 ,讓Python2和3共存php
環境:CentOS7.1 需求:網絡暢通python
yum groupinstall "Development tools" yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-deve
# 國內源http://mirrors.sohu.com/python/3.4.3/Python-3.4.3.tgz wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz tar xf Python-3.4.3.tgz cd Python-3.4.3 ./configure --prefix=/usr/local --enable-shared make make altinstall
echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf ldconfig
yum groupremove "Development tools" --remove-leaves yum remove zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-deve
參考: 我是參考linux