How to Install Python 3.6 in Ubuntu

Python is the fastest-growing major general purpose programming language. There are a number of reasons attributed to this, such as its readability and flexibility, easy to learn and use, reliable and efficient as well.

There are two major Python versions being used – 2 and 3 (the present and future of Python); the former will see no new major releases, and the later is under active development and has already seen a lot of stable releases over the last few years. The latest stable release of Python 3 is version 3.6.

Ubuntu 18.04 as well as Ubuntu 17.10 come with Python 3.6 pre-installed, which is not the case for older Ubuntu versions. In this article, we will explain how to install latest Python 3.6 in Ubuntu 14.04, 16.04, 16.10 and 17.04 via the APT package manager.

To install Python 3.6 from sources in all major Linux distributions, check out this guide: How to Install Latest Python 3.6 Version in Linux

Install Python 3.6 in Ubuntu 14.04 and 16.04

By default, Ubuntu 14.04 and 16.04 ship in with Python 2.7 and Python 3.5. To install latest Python 3.6 version, you can use “deadsnakes” team PPA which contains more recent Python versions packaged for Ubuntu.

$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt update
$ sudo apt install python3.6

Install Python 3.6 in Ubuntu 16.10 and 17.04

On Ubuntu 16.10 and 17.04, you can find Python 3.6 package in the Universe repository and easily install it via apt as shown.

 
$ sudo apt update
$ sudo apt install python3.6

To view a list of all Python binaries installed on your system, run the following ls command.

$ ls -l /usr/bin/python*
List Python Binaries

List Python Binaries

From the output in the screenshot above, the default Python version on the test system is 2.7, you can also check Python version using the following command.

$ python -V

To use Python 3.6, invoke the following command.

$ python3.6 
Python Interpreter

Python Interpreter

To exit the Python interpreter, type the following command and press Enter.

quit()
OR
exit()

That’s all! In this short article, we have explained how to install Python 3.6 in Ubuntu 14.04, 16.04, 16.10 and 17.04 via the APT package manager. If you have questions, use the comment form below to reach us.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

1 Response

  1. Afsal says:

    I have changed the symlink to python3 from python3.5 to python3.6, after that terminal won’t open, when i revert back that change terminal is working properly what might be the reason for that.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.