• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Install Python on Debian 11

Written by Admin, Updated On January 19, 2023
debian, python
How to Install Python 3.11 Debian 11

Python is most popular programming language. It uses many methods to create different types of applications. Python 3.11 is the latest major release of the Python language. It includes many new features such as new dict operators, new str functions, support for IANA time zone, and more. This tutorial describes multiple ways to install Python 3.11 on Debian 11 system.

Install Python on Debian 11#

By default, Python 3.11 is not available in the standard Debian 11 repositories so we will download it from Python source.

Perform the following steps to install Python 3.11 on your system:

Step 1 – Install Libraries#

To install Python from source, you need to install some development libraries to compile Python source code. Execute below commands:

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

Step 2 – Download Python 3.11#

Download the latest Python source code from the Python official site with wget. Check the latest version at the time of downloading:

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

Once the download is complete, extract the downloaded source archive file.

tar xzf Python-3.11.1.tgz

Step 3 – Building Python#

Now go to the Python source directory and run the configure script and altinstall command as sudo user to build Python source code:

cd Python-3.11.1
./configure --enable-optimizations
sudo make altinstall

It will check that all of the dependencies on your system are installed.

Note : Do not use the standard make install as it will overwrite the default system python3 binary.

Step 4 – Verify Python Version#

To verify it by type:

python3.11.1 --version
Python-3.11.1

Congratulations! Python 3.11 is installed on your Debian system and ready to be use.

Conclusion#

This guide explained you how to install Python 3.11 on Debian 11 system.

If you have any questions or feedback, please leave a comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Puppet Agent on Ubuntu 22.04
Next Article   How to Install Nginx on Ubuntu 22.04

Related Posts

  • How to Change Hostname Debian 11

    How to Change Hostname on Debian 11

    February 3, 2023
  • How to Install Mongodb on Debian 11

    How to Install MongoDB on Debian 11 Linux

    January 11, 2023
  • How to Install Jenkins on Debian 11

    How to Install Jenkins on Debian 11

    January 5, 2023

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install SSH Keys on Ubuntu 22.04
    How to Set up SSH Keys on Ubuntu 22.04 January 7, 2023
  • How to Install Mongodb on Debian 11
    How to Install MongoDB on Debian 11 Linux January 11, 2023
  • How to Install Puppet Agent on Ubuntu 22.04
    How to Install Puppet Agent on Ubuntu 22.04 January 22, 2023
  • How to Install Jenkins on Debian 11
    How to Install Jenkins on Debian 11 January 5, 2023
  • How to Change-Hostname Ubuntu 22.04
    How to Change Hostname on Ubuntu 22.04 January 19, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook