
$ sudo apt-get install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget The first thing to do is install the requirements for compilation. In addition to installing Python 3.6, the installation of Python 3.7 has been tested using the same method, and all worked without problem. In the case of using another type of distribution that is not based on Debian, it would be necessary to rename the packages to be installed, and I also cannot ensure that it works. These steps have been tested only in Debian 9, but they will surely be equally compatible with other OS such as Ubuntu or similar. If you have any questions or feedback, leave a comment below.Today I bring you an easy method to install python 3.6 or higher on Debian 9, and incidentally solve a couple of problems that arose during this installation. This tutorial shows you multiple ways to install Python 3.9 on Debian 10 system. Verify the installation by typing: python3.9 -version Python 3.9.0+ Conclusion #

Python 3.9 has been installed from source and ready to be used.

Once the build process is complete, install the Python binaries by typing: sudo make altinstall You would run the following command to start the build process for python: make -j 12įor faster build time, modify the -j to correspond to the number of cores in your processor.

The -enable-optimizations option optimizes the Python binary by running multiple tests. It will do few checks that required dependencies are installed. Navigate to the Python source directory and execute the configure script. Once the download is finished, extract the tarball: tar -xf Python-3.9.0.tgz Step 3 – Configure script # Sudo apt update sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev Step 2 – Download source code #Īfter that download the latest source code from Python download page using wget: wget
