ubuntu16.04 Installation Configuration python3.6

Source: Internet
Author: User

In Ubuntu 16.04, the system installs Python version 2.7 and 3.5 by default, but during development we may use the python3.6, remove the default version and worry about the system, so you can choose to install the python3.6 on the system.

1. Configure the repositories, because the Python 3.6 version is not published in the official Ubuntu warehouse, we do through the 3rd party warehouse. On the command line, enter:

sudo add-apt-repository ppa:jonathonf/python-3.6

2. Check the System software package and install Python 3.6

sudo apt-get updatesudo apt-get install python3.6

  

3. View Python version information (now there are 3 Python versions in your system)

Python-vpython2-vpython3-vpython3.6-v

  

4. Through the above instructions we found that the new installation of the 3.6 need to enter python3.6 to use, that can be configured I only enter Python3 when the default use of 3.6, of course, execute the following command:

sudo update-alternatives--install/usr/bin/python3 python3/usr/bin/python3.5 1sudo update-alternatives--install/usr /bin/python3 python3/usr/bin/python3.6 2sudo update-alternatives--config Python3

 

5. Test whether Python3 default to 3.6 version

Python3-v

ubuntu16.04 Installation Configuration python3.6

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.