Linux comes with Python in general, but 2014 years ago, Linux comes with Python 2.x.x and even earlier versions.
You need to use python3.x.x to download the installation yourself.
Online there is a direct download of Python on the official website method, the test failed to change a few versions of the download or failure.
code snippets that cannot be implemented : wget http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
It is possible to : You can find python3.x.x Linux files online now, upload to Linux system, then install python3.x.x
Download the source tar package first
To find online, the following download link is valid: http://xiazai.zol.com.cn/detail/33/320958.shtml
I downloaded the python-3.1.2.tar.bz2 version, downloaded to the download directory, unzip
BUNZIP2 python-3.1.2.tar.bz2
TAR-XVF Python-3.1.2.tar
Go to the Unpacked folder
CD Python-3.1.2
Build a folder in/usr/local before compiling Python3 (as a Python installation path to avoid overwriting the old version)
Mkdir/usr/local/python3
Start compiling the installation
./configure--prefix=/usr/local/python3
Make
Make install
The old version is not overwritten at this time, then the original/usr/bin/python link is changed to another name
Mv/usr/bin/python/usr/bin/python_old
Link to build a new version of Python
Ln-s/usr/local/python3/bin/python3/usr/bin/python
Enter Python at this time
The new version of Python will be displayed.
[[email protected] python-3.1.2]# Python
Python 3.1.2 (r312:79147, Dec 2 2014, 11:31:20)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "Help", "copyright", "credits" or "license" for more information.
>>> quit ()
PS: If you do not set up a new installation path Python3, but the direct default installation, the installation of the new Python should be overwritten with the old version of Linux, or may not overwrite, specific to the installation process, this can be tested on their own, if you want to retain the original version, this method is best.
Install python3.x.x under Linux