How To Install Python 3.x in Linux/Debian/Ubuntu/Linux Mint

Python is a high-level interpreted programming language. The first version of Python was released in 1991. In this article we are not going to discuss what kind of language it is or how you can use it but to show you how you can install it on your Linux system.
If you are a Python programmer or you want to run some program which requires latest Python version then you are on the right page, we will show you how you can install latest Python version on your Linux(Debian/Ubuntu/Linux Mint/other distributions), currently Python reached at 3.7.x version. Making other Python version default in Linux can make Python applications and desktop components unusable which use certain version of Python. It is better not to set any Python as default in Linux (PS: You can set as default, if you know how to fix if something goes wrong). It is easy to revert back any Python version. Lets start…

Python 3.7.x

We are going to show you two ways to install Python 3.7.x, the PPA method is for Ubuntu/Linux Mint/and Ubuntu dervatives. The second method is universal that means you can install Python 3.7.x on any Linux distribution (Fedora, CentOS, RedHat, openSUSE, Manjaro, ArchLinux etc.)

Install Python 3.7.x using PPA in Ubuntu/Linux Mint

PPA is fairly simple way to install Python:

Available for Ubuntu 18.04 Bionic/16.04 Xenial/14.04 Trusty/Linux Mint 19/18/17/and other related Ubuntu derivatives
To install Python 3.7.x in Ubuntu/Linux Mint open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal:

Terminal Commands:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.7

If you want to install Python 3.6 then use this command(Ubuntu 16.04/14.04/Linux Mint 18/17):

Terminal Commands:
sudo apt-get install python3.6

For Python 3.5 use this command (Ubuntu 18.04/14.04/Linux Mint 19/17):

Terminal Commands:
sudo apt-get install python3.5

For Python 3.4 use this command (Ubuntu 18.04/16.04/Linux Mint 19/18):

Terminal Commands:
sudo apt-get install python3.4

For Python 3.3 use this command (Ubuntu 18.04/16.04/14.04/Linux Mint 19/18/17):

Terminal Commands:
sudo apt-get install python3.3

Install Python 3.7.x using source

Using this method you can install Python 3.7.1 in any Linux distribution (Debian, Fedora, CentOS, Manjaro, ArchLinux, openSUSE, Ubuntu etc.)

Terminal Commands:
wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
tar -xvf Python-3.7.1.tgz
cd Python-3.7.1
sudo ./configure –enable-optimizations
sudo make -j8
sudo make install

That’s it

Visit on site http://www.appmarsh.com

Published by Marshmallow

Marshmallow Android is BT Ireland’s Head of Sales for Republic of Ireland domestic multi-site companies, indigenous MNCs and public sector accounts. He is responsible for the direction and control of all sales activity in the region. He has over 10 years management experience from high growth start-ups to more established businesses. He’s led teams in Ireland, India and China across various industries (ICT, On-Line Recruitment, Corporate Training and International Education).