

This way of installing Python 3.6.4 is not recommended because it may install/upgrade packages from the Debian ‘testing’ repository which are incompatible with your current Debian 9 installation. Now you can open the Python 3.6.4 interpreter by executing the following command: # python3.6 Installing Python 3.6.4 from the Debian testing repository

Then run the following command to build Python 3.6.4: # make -j8Īnd then run this command to install Python 3.6.4: # sudo make altinstall Unpack the Python 3.6.4 source file: # tar xvf Python-3.6.4.tgzĮnter the Python-3.6.4 directory and run ‘./configure’ to prepare the build: # cd Python-3.6.4 # sudo apt-get install -y libncurses5-dev libncursesw5-dev xz-utils tk-devĭownload the Python 3.6.4 source file using ‘wget’: # wget # sudo apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm Now we’ll build and install Python 3.6.4 from source, this is the safest and recommended way that doesn’t add any repositories that might install conflicting packages on your Debian 9 server.īegin by installing the required build tools for Python 3.6.4: # sudo apt-get install -y make build-essential libssl-dev zlib1g-dev

