• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Install Python 3.7 on Debian 9

Written by Admin, Updated On May 7, 2020
debian, python
How to Install Python on Debian 9

Python is popular programming language in the world. Python is a versatile programming language and you can use it to write small scripts, build games, develop websites, create machine learning algorithms, analyze data and more.

Right now Python 2 is active and well supported but Python 3 is considered to be the present and future of the language. Currently, Python 3.7 is the latest major release of the Python language which includes many new features.

Many popular applications and websites including YouTube, DropBox, Reddit, Quora, Instagram, Pinterest have been developed using Python. In this tutorial, described how to install python 3.7 on Debian 9 system.

Prerequisites#

Before you start installing Python 3.7 on Debian 9, you should have non-root user account with administrative privileges.

Install Python 3.7 on Debian#

There are very easy steps to install Python 3.7 on your Debian 9 system. Follow the below steps:

At first, you should update package index list by typing:

sudo apt update

Next, install the necessary packages to build Python source:

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

After that, you have to download latest release source code from the Python download page using wget or curl command:

curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz

Once the download has been finished, extract the tarball:

tar -xf Python-3.7.3.tar.xz

Now run the configure script from python source directory that will do number of checks that all dependencies are installed correctly on your system.

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

You should run make command to start the build process:

make -j 4

You have to modify -j flag as per your system’s processor cores. My system has 4 cores, so I am using the -j 4 flag.

On completion of build, now install Python binaries by executing following command as sudo user:

sudo make altinstall

That’s all. Python 3.7 is installed on your Debian 9 system and ready to be used. If you want, you can verify it by typing:

python3.7 --version
Output
Python 3.7.3

Conclusion#

You have successfully installed Python 3.7 on your Debian 9 machine. You can also install third-party modules with Pip and develop your Python 3 project.

If you have any questions or suggestion, please leave a comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Pip on CentOS 7
Next Article   How to Install Sublime Text 3 on CentOS 7

Related Posts

  • How to Install Php 8 on Debian 10

    How to Install PHP 8 on Debian 10

    January 2, 2021
  • How to Install Python 3.9 on CentOS 8

    How to Install Python 3.9 on CentOS 8

    December 31, 2020
  • How to Install GIMP on Debian 10

    How to Install GIMP 2.10 on Debian 10

    December 27, 2020

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on Debian 10
    How to Install Python 3.9 on Debian 10 December 25, 2020
  • How to Install GIMP on Ubuntu 20.04
    How to Install GIMP 2.10 on Ubuntu 20.04 December 22, 2020
  • How to Install Notepad++ on Debian 10
    How to Install Notepad++ on Debian 10 December 23, 2020
  • How to Install Php 8 on Debian 10
    How to Install PHP 8 on Debian 10 January 2, 2021
  • How to Install Php 8 on Ubuntu 20.04
    How to Install PHP 8 on Ubuntu 20.04 December 28, 2020
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook