Install Multiple Python versions in Ubuntu

Source: Internet
Author: User
Ubuntu comes with python 2.5 by default. As a result, I installed python 2.6. I checked it online and found that python 2.5 is the most popular version currently, some python libraries use this version, so you have to switch back to python 2.5. In fact, multiple python versions can coexist in linux, however, when running in the terminal, you can enter Python or Python to enter different versions.

Ubuntu comes with python 2.5 by default. As a result, I installed python 2.6. I checked it online and found that python 2.5 is the most popular version currently, some python libraries use this version, so you have to switch back to python 2.5. In fact, multiple python versions can coexist in linux, but when running in the terminal, you can enter different versions by entering python2.5 or python2.6, and in your *. which can be used in The py file #! /Usr/bin/python is used to specify the interpreter version of the program. However, this method is inconvenient to use, so you can point to the/usr/bin/python shortcut and modify it.

:~ $ Sudo rm/usr/bin/python

:~ $ Sudo ln-s/usr/include/python2.5/usr/bin/python

In this case, input python 2.5 by default in the terminal.

It's very easy. I am also a beginner. It's no difficulty. Just take a study note.

Related Article

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.