GNU/Linux >> Linux Esercitazione >  >> Debian

Installare Python 3.9 su Debian 11

Python 3.9.7 si installa da sorgenti su Debian 11.

1. Dipendenze

$ sudo apt update
$ sudo apt install build-essential libncurses5-dev zlib1g-dev libnss3-dev libgdbm-dev libssl-dev libsqlite3-dev libffi-dev libreadline-dev curl libbz2-dev

2. Download e build

$ sudo wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz
$ tar -xvf Python-3.9.7.tgz
$ cd Python-3.9.7
$ ./configure --enable-optimizations
$ make -j 2
$ sudo make altinstall

3. Test

$ python3.9 --version
$ python3.9

Esempio:

x = 35
y = 75
z = x + y
print("Hello, the sum of x and y is", +z)

Output: Hello, the sum of x and y is 110.

Debian
  1. Come installare Python 3.8 su Debian 11 Bullseye

  2. Installare Python 3.9 su Debian 11 Bullseye e configurare un venv

  3. Debian – Come installare Python 3.6?

  4. Come installare Python 3.6.4 su Debian 9

  5. Come installare Python 3.10 su Debian 11

Come installare Debian 11 Bullseye: guida passo passo

Installare Python 3.10 su Debian 11 senza rompere l'interprete di sistema

Come installare Python 3.7 su Debian 11 Bullseye

Come Installare Python 3 su Debian 8

Come installare Python 3.7 su Debian 9 Stretch

Come installare Go (Golang) su Debian 10 Buster