How to install Python 3 on Debian 9

From using basic commands in Debian we will be giving you a step-by-step guide on installing Python on your Debian server

Updated: 14 Apr, 23 by Elizabet J 2 Min

How to install Python 3 on Debian 9

Well, so far, with this Python definition we will be working with you to install Python 3.6 in Debian 9 with our tutorial.

Note: Note that all commands will be entered with root access, and if you do not have root access, you must execute the commands from the Sudo group and enter the sudo command before all commands.


Tutorial on installing Python 3.6 in Debian 9

1. First, type the following command to update the Debian repositories and packages(How to connect linux VPS).

apt-get update && sudo apt-get upgrade

2. After complete updates, install the following commands in order to install Python 3.6.

apt-get install -y do build-essential libssl-dev zlib1g-dev
apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm
apt-get install -y libncurses5-dev libncursesw5-dev xz-utils tk-dev

3. Now import the Python package by downloading it from its official site.

wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz

4. After downloading, remove it from the compressed state.

tar xvf Python 3.6.4.tgz

5. After extracting the compressed file, enter the following command to go to the Python directory.

cd Python 3.6.4

6. Now it's time to import the following command so that Python is ready to be installed.

./configure --enable-optimizations
make-j8

7. Finally, enter the following command to install Python.

make altinstall

You have successfully installed Python directly from its official site.
We hope this tutorial helped you in starting your journey with Python.

MonoVM provides high qulity SSD Linux VPS delivarable in only 20 seconds.

Elizabet J

Elizabet J

One OF my major goals is getting new experiences about ICT and what’s more making progress through this field.

user monovm

Lexi Larkin

2024, Jun, 24

Great tutorial! Your step-by-step guide on installing Python 3.6 on Debian 9 is super easy to follow. I appreciate the detailed instructions and the reminders about root access and using sudo. This is definitely helpful for anyone looking to get Python up and running on their Debian systems. Thanks for sharing!

user monovm

Mckenna Cole

2024, Jun, 24

Great guide on installing Python 3.6 on Debian 9! The step-by-step instructions are very clear and easy to follow. It's nice to see all the commands laid out in sequence. This will be incredibly helpful for anyone looking to set up Python quickly and efficiently. Thanks for sharing!