Home >System Tutorial >LINUX >How to install multiple Python versions under Linux
Download the source files from http://www.python.org/download/.
tar zxvf Python-2.7.6.tgz cd Python-2.7.6 ./configure --prefix=/usr/local/python-2.7.6 #重要,指定python的安装路径,可以自己设置。 make sudo make install
The default python command is in the /usr/bin/ directory. You need to modify the soft link here to version 2.7 and create a 2.4 soft link.
mv /usr/bin/python /usr/bin/python2.4 #根据需要来 ln -s /usr/local/python-2.7.6/bin/python /usr/bin/python
The above is the detailed content of How to install multiple Python versions under Linux. For more information, please follow other related articles on the PHP Chinese website!