About the default Python version of Ubuntu

Source: Internet
Author: User

Most Ubuntu system default Python versions are python2.x series, but the latest version is already 3.5 and 3.6, the software system follows the version always has a lot of benefits, so, the following is the author's experience in modifying the Ubantu default Python version:

1, terminal input: Python-v View the default version (generally python2.x series)

2, do not rush to download the python3.x version, the terminal type the following command

Whereis Python3

Look at the output, and if you already have it, you can skip the installation step, and the last few versions of Ubuntu basically have Python2 and 3 installed by default.

If not installed, sudo apt-get install Python3

3, after the system installed python3.5 version

(1) If you just call the interpreter temporarily, enter the corresponding version number in the terminal

(2) Modify the default Python interpreter (to establish a soft connection to python3.5, note that the path may be slightly different, I'm/usr/bin/python3.5 here, you can see the path you've installed in the results of Whereis Python3 above)

When the terminal enters Python, the python3.5 interpreter is called directly.

If the article to you even a little bit of help, trouble point a recommendation or attention, support the creator! Thank you very much!

About the default Python version of Ubuntu

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.