Install Python 3.7 On Ubuntu 18.04 LTS

Install Python 3.7 On Ubuntu 18.04 LTS

Insight: Install Python 3.7 On Ubuntu 18.04 LTS

Python is one of the most popular programming language right now. It can be used in small web application development to large-scale development like Artificial Intelligence.

Tutorial To Install Python 3.7 On Ubuntu 18.04 LTS

At the time of this article, Python 3.7 is the latest release version. In this tutorial post, we are going to show you the method to install Python 3.07 on Ubuntu 18.04 LTS.

Tutorial To Install Python 3.7 On Ubuntu 18.04 LTS

Install Python 3.7 On Ubuntu Via Repository

Let’s install Python 3.7 from repository. Run the following command to update the packages and install required prerequisites. Open the terminal and execute the following commands:

sudo apt update
sudo apt install software-properties-common

Add the repository now:

sudo add-apt-repository ppa:deadsnakes/ppa

After adding repo, it’s time to install Python 3.7 with following command:

sudo apt install python3.7

You can verify your python version with the following command:

python3.7 --version

In another method, We can install Python 3.7 from the original source:

Install Python 3.07 On Ubuntu Via Source

Run the following command to update the packages list and install the necessary packages:

sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget

 

Now, Download the latest release’s source code:

wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz

Now, You need to extract the downloaded file:

tar -xf Python-3.7.2.tar.xz

Go to the Python source directory and run the configure script. It  perform a number of checks so that everything is perfect.

cd Python-3.7.2.
/configure--enable-optimizations

Run the following command to start the Python build process:

make -j 8

Finally, Install the python with the following command in your system:

sudo make altinstall
READ More Relevant Stuff:  Canonical Introducing The Ubuntu AWS Rolling Kernel

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

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