Install Python3.4 on centos
1. Install Python dependency packages
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-devel
2. Download and compile the Python3.4 source code package
wget https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgztar xf Python-3.4.1.tgzcd Python-3.4.1./configure --prefix=/usr/local --enable-sharedmakemake install
3. Configure the library before running Python:
echo /usr/local/lib >> /etc/ld.so.conf.d/local.confldconfig
4. Run the demo:
python3 --versionPython 3.4.1
5. Delete the library required for compiling Python.
yum groupremove "Development tools" --remove-leavesyum remove zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel --remove-leaves