Http://linux.it.net.cn/CentOS/course/2015/1010/17718.html
Installation Environment
Yum Install GCC
Yum Install Zlib-devel
Yum Install make
Download the Python version
wget http://www.python.org/ftp/python/3.4.0/Python-3.4.0.tgz
Unzip, compile, and install
TAR-ZXVF python-3.4.0.tgz
CD Python-3.4.0
./configure–prefix=/opt/python3
Make all
Make install
Clears the previously compiled executables and configuration files. Linux Learning, http://linux.it.net.cn
Make clean
Clear all generated files
Make Distclean
View new version information for installation
/opt/python3/bin/python3-v
Python 3.4.0
This shows that the new version of the compiled installation Python is in effect.
Make a soft connection to the current user's Bin directory
Ln-s/opt/python3/bin/python3/usr/bin/python3 ln-s/OPT/PYTHON3/BIN/PIP3/USR/BIN/PIP3
After upgrading the new version of Python, the default remains python2.6
Change the #!/usr/bin/python of the file head to #!/opt/python3/bin/python3.
Install Virtualenv3:
Download source file:
1. Upzip
2. Su Root
3. Python3 setup.py Install
4. Ln-s/opt/python3/bin/virtualenv/usr/bin/virtualenv3