install python 3.6 on ubuntu 16.04

default version of ubuntu 16.04 is 3.5.2. to install python 3.6 on ubuntu 16.04, follows the steps below:

How to Install Python 3.6 on Ubuntu 16.04

We’ll show you, How to Install Python 3.6 on Ubuntu 16.04. Python is a high-level, interpreted, interactive and object-oriented scripting language, and it is one of the most popular programming languages in the world. Python is designed to be highly readable and it can be used to build just about anything. It is using English keywords instead of punctuation and it also has fewer syntactical constructions than other programming languages. Python allows programmers to use different programming styles for creating their programs, get quicker results and write code almost as if speaking in a human language. Some of the most popular systems and applications in the world that have employed Python during development include Google Search, YouTube, Google App Engine, Maya and many more. Installing Python 3.6 on Ubuntu 16.04, is an easy task, just follow the steps below carefully and you should have Python 3.6 on Ubuntu 16.04 installed in few minutes.

Python 2.7 and Python 3.5 are installed on Ubuntu 16.04 by default. In this tutorial we will guide you through steps of installing the latest Python 3.6 on Ubuntu 16.04.

1. Login via SSH and update all installed packages

First of all, login to your Ubuntu 16.04 VPS via SSH as user root

and update all installed packages

2. Check the currently installed version of Python

To check the currently installed version of Python, execute the following command

To check the Python 3 version, use the following command

There are two methods of installing Python 3.6 on an Ubuntu 16.04 VPS, from source and from PPA.

3. Install Python 3.6 on Ubuntu 16.04, from source

In order to install the latest Python 3.6 release for Linux/UNIX, go to their official website and download its source code to your server. At the moment of writing this article it is version 3.6.3

and unpack the downloaded archive

4. Method 1: Run the “configure” script

Change the current working directory and run the ‘configure’ script

if the error is:

Do the following:

If there are no errors, run the following commands to complete the installation process of Python 3.6

If you get the following error message

install the ‘zlib1g-dev’ package

are run ‘make’ and ‘make install’ again.

That’s all. Python 3.6 should be successfully installed at this point. You can check this with the following command

5. Method 2: Install Python 3.6 from PPA

You can also install Python 3.6 from J Fernyhough’s Personal Package Archive (PPA).
Install the following requirements

Run the following command to add the PPA

6. Update the repositories

update the repositories

7. Install Python version 3.6 on Ubuntu 16.04

and finally install Python version 3.6

7. Verify Python 3.6.3 installation on Ubuntu 16.04

Once it is installed, you can verify the installed version by executing the following command


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store