Install python in multiple versions in linux-Python tutorial

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.