Python is one of the most popular programming languages in the world. With its simple and easy to learn syntax Python is a great choice for beginners and experienced developers. Python is quite a versatile programming language, you can use it to do almost anything you want, write small scripts, build games, develop websites, create machine learning algorithms, analyze data and more. Python is also portable which means you can run the same Python script on different operating systems without any changes.
Python 2 support ends in 2020. Python 3 is the present and future of the language.
Python 3.7 is the latest major release of the Python language, and it includes many new features such as postponed evaluation of type annotations, support for data classes and context variables, customization of access to module attributes, and more.
This tutorial covers how to install Python 3.7 on Debian 9.
Building Python 3.7 on Debian is a relatively straightforward process and will only take a few minutes.
sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl libbz2-dev
Python download page
using the following curl command
:curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
3.7.3
.tar -xf Python-3.7.3.tar.xz
configure
script that will perform a number of checks to make sure all of the dependencies on your system are present:cd Python-3.7.3
./configure --enable-optimizations
--enable-optimizations
option will optimize the Python binary by running multiple tests which will make the build process slower.make
to start the build process:make -j 8
-j
flag according to your processor. If you do not know the number of cores your processor you can find it by typing nproc
. My system has 8 cores, so I am using the -j8
flag.sudo make altinstall
make install
as it will overwrite the default system python3
binary.python3.7 --version
Python 3.7.3
#debian #python