This article describes how to implement multi-version python installation in linux. For more information, see pythonbrew.
The code is as follows:
Easy_install pythonbrew
[Root @ li637-23 schsert] # pythonbrew_install
Well-done! Congratulations!
The pythonbrew is installed:
/Root/. pythonbrew
Please add the following line to the end of your ~ /. Bashrc
[[-S "$ HOME/. pythonbrew/etc/bashrc"] & source "$ HOME/. pythonbrew/etc/bashrc"
After that, exit this shell, start a new one, and install some fresh
Pythons:
Pythonbrew install 2.7.2
Pythonbrew install 3.2
For further instructions, run:
Pythonbrew help
The default help messages will popup and tell you what to do!
Enjoy pythonbrew at/root/. pythonbrew !!
[Root @ li637-23 schsert] # vim/root/. pythonbrew
[Root @ li637-23 schsert] #. ~ /. Bashrc
[Root @ li637-23 schsert] # pythonbrew install 2.7.2
Downloading Python-2.7.2.tgz as/root/. pythonbrew/dists/Python-2.7.2.tgz
######################################## ################################ 100.0%
Extracting Python-2.7.2.tgz into/root/. pythonbrew/build/Python-2.7.2
This cocould take a while. You can run the following command on another shell to track the status:
Tail-f "/root/. pythonbrew/log/build. log"
Installing Python-2.7.2 into/root/. pythonbrew/pythons/Python-2.7.2
How about friends? isn't it very easy. if you have the same requirements, let's take a look.