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.