1, you can use the Linux self-contained download tool wget download, as follows: (
The author installs the minimum CentOS system, so the wget service must be installed before using the Compile command, if the reader installs the interface CentOS system, or if the compiler tool is used, the installation wget can be skipped, and the following compilation steps will be done directly)wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tgz 2, download the completion of the download directory, unzipTAR-XZVF python-3.3.0.tgz
3. Enter the extracted folderCD Python-3.3.0
4, build a folder in/usr/local before compiling Python3 (as a Python installation path, so as not to overwrite the old version)Mkdir/usr/local/python3(Create a new folder here with mkdir, and touch if you are creating a new file)
5. Start compiling the installation (
The author installs the minimum CentOS system, so before using the compile command, you must install the compilation Suite gcc, if the reader installs the interface CentOS system, or the use of the compiler tool can skip the installation of GCC, directly below the compilation steps)./configure--prefix=/usr/local/python3
Make
Make Install
6, at this time does not overwrite the old version, and then the original/usr/bin/python link changed to another name (the author retains two versions of, a python, a python3, so the 6th step of the author skipped, the 7th step of the link after the name changed to Python3, the reader can follow the normal steps, Achieve the same effect)mv/usr/bin/python/usr/bin/python_old27. Create a new version of the Python linkln-s/usr/local/python3/bin/python3/usr/bin/python8. Enter at this timepython-v
10. A new version of Python will be displayed. [email protected] home]# python-vPython 3.3.0 PS: If you do not set up a new installation path Python3, but rather a direct default installation, the new Python after installation should be overwritten with the old Linux version, or may not overwrite, the specific look at the installation process, this everyone can test their own, Of course, if you still want to keep the original version, then this method is best.
Upgrade Python version under CentOS, detailed steps