Previously learned Python, is more than 3 version, recently installed on the VM Centos6.5, the python is 2.6.6, although and Python3.4 is not much different, but still want to upgrade Python to 3.3.4, so from the online collection of learning began to tinker.
Installation Environment
Yum Install GCC
Yum Install Zlib-devel
Yum Install make
Download python version
wget http://www.python.org/ftp/python/3.4.0/Python-3.4.0.tgz
-
tar-zxvf python-3.4.0.tgz
CD PYTHON-3.4.0 
./configure--prefix=/opt/python3
make all
make clean
Clear all generated files
make Distclean
View new version information for the installation
/opt/python3/bin/python3-v
Python 3.4.0
This shows that the new version of the compiled installation Python is in effect.
5. Configuration environment (CentOS 6.5 comes with Python2)
① adding /usr/local/python-3.3/bin to Path
# cd /etc# vi /etc/profile末尾添加PATH=$PATH:/opt/python3/bin# source profile# echo $PATH |
② creating a linked file
# cd /usr/bin# rm -rf python# ln -s /usr/local/python-3.3/bin/python3.3 ./python |
CentOS 6.5 Installation python3.3.4