

With this we would have already managed to install Python 3.6 on Debian and therefore we can use it through the python3.6 and pip3.6 commands, but if what you want is to do Make it the system default, continue reading the article. Now we must verify that it has been installed correctly. With this we will have finished installing python version 3.6 in our Debian. Once the compilation process is finished (which can take 15-20 minutes depending on the power of the machine), we can proceed to install python 3.6 on Debian 9. In the event that we do not want to use the full power of the machine so as not to affect other services, it may be lower. NOTE: The -j Indicates the number of threads to use, so it is recommended to configure it according to the number of processors we have. Once the compilation configuration is finished, we will proceed to execute the make command to generate the binaries. configure -enable-optimizations -enable-loadable-sqlite-extensions Of course, for it to work it is necessary to have previously installed the library. This last option is to enable the compilation of SQLite libraries, and like the library, it is optional. $ tar xvf Python-3.6.10.tar.xzīeing already in the source code folder, we will proceed to configure the compilation with the options –enable-optimizations and –enable-loadable-sqlite-extensions. Once we have downloaded it, we will proceed to unzip it and enter the unzipped folder. For this we will visit the Python page and download the version we need.

Once all the packages necessary for compilation are installed, we will proceed to download the source code. I have separated the sqlite3 library in another line, because it is not mandatory for the installation of Python 3.6, but it is advisable if we need its use or we plan to need it, since to do so later we would have to recompile python 3.6 again. $ 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. 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.
