Install Python 3 Linux

I am very new to linux and want to use python as it is the language I am learning at school. I have looked online and checked my current version is 2.7 which is no good to me as I am learning python 3. H ow do I install python an interactive high-level object-oriented language on Linux operating system? Python runs on many operating systems such as MS-Windows, Mac OS, Mac OS X, Linux, FreeBSD, OpenBSD, Solaris, AIX, and many varieties of free UNIX like systems.

Hello Linux Geeksters.

In this article I will show you how to install Python 3.3, the latest Python version available on Ubuntu 13.04 Raring Ringtail, Ubuntu 12.10 Quantal Quetzal and Ubuntu 12.04 Precise Pangolin.

You can install Python 3.3 via PPA, on Ubuntu 12.10 and Ubuntu 12.04:

Install dependencies:

$ sudo apt-get install python-software-properties

Add the repo:

$ sudo add-apt-repository ppa:fkrull/deadsnakes

Update the repo index:

$ sudo apt-get update

Install Python 3.3:

Install Python 3 Linux Command

$ sudo apt-get install python3.3

Installing Python 3.3 on Ubuntu 13.04:

Because there is no PPA for Ubuntu 13.04, we’ll do an installation from sources.

Installing the dependencies:

$ sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev

Download and compile python:

$ wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tar.bz2
$ tar jxf ./Python-3.3.0.tar.bz2
$ cd ./Python-3.3.0
$ ./configure --prefix=/opt/python3.3
$ make && sudo make install

Some nice touches to install a py command by creating a symlink:

$ mkdir ~/bin
$ ln -s /opt/python3.3/bin/python ~/bin/py

Related Posts

Tagged with: how to install python 3.3 on ubuntu 13.04, linux, python, python 3.3, ubuntu, ubuntu 12.04, ubuntu 12.10, ubuntu 13.04, unix
Posted in The Linux and Unix Articles!

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.

Ubuntu

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.

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.

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

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.

To use Python 3.6, invoke the following command.

Python Interpreter

Install Python 3 Linuxmint

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

Install Python3 Linux Redhat

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.

Linux Install Python 3 And Python 2

Share