In Linux, Python 3 is installed. Although Python has been updated by default in my unbuntu 10.11, I will re-introduce how to install python in Linux. There are some installation tutorials on the Internet.
Abstract:
1. DownloadSource codeHttp://www.python.org/ftp/python/2.5.2/Python-2.5.2.tar.bz2
2. Installation
$ Tar-jxvf Python-2.5.2.tar.bz2
$ CD Python-2.5.2
$./Configure
$ Make
$ Make install
3. Test
Enter python in the command line. If the python interpreter is displayed, the installation is correct.
Python version 2.4.x is installed by default in suse10 or rhel5 (es5;
Enter
# Python
The result is displayed:
# Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
[GCC 4.1.1 20061130 (Red Hat 4.1.1-43)] on linux2
Type "help", "copyright", "credits" or "License" for more information.
>>>
Version 2.4.x
Solution:
# Cd/usr/bin
# Ll | grep Python // view python in this directory
# Rm-RF Python
# Ln-s prefix/Python-2.5.2/python./Python // prefix unzip the python directory for you
# Python
# Python
Python 2.5.2 (#1, Dec 11 2006, 11:38:52)
[GCC 4.1.1 20061130 (Red Hat 4.1.1-43)] on linux2
Type "help", "copyright", "credits" or "License" for more information.
>>>
OK! Solve the problem!