Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Programming»Python»How To Install Python 3.11 on Debian 11/10

    How To Install Python 3.11 on Debian 11/10

    By RahulJanuary 25, 20233 Mins Read

    The Python team has announced the new release of Python 3.11. At the same time, Python 3.12 development has been started. So as of today, Python 3.11 is the latest version available for installation. This version is loaded with various new features and security upgrades. The Python developer will feel better with this version in terms of error display and debugging etc.

    Advertisement

    This tutorial will help you to install Python 3.11 on Debian 11 & Debian 10 Linux systems. The tutorial will compile and install Python 3.11 source code on your system.

  • Step by Step Instructiosn to Create Python Virtual Environment
  • Prerequisites

    Log in to your Debian system with a sudo privileged account. Then open a terminal (CTRL+ALT+T) and execute the below commands to update packages.

    sudo apt update && sudo apt upgrade 
    

    Then install the required packages for the compilation of Python source code.

    sudo apt install wget build-essential libncursesw5-dev libssl-dev \
         libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev  
    

    Install Python 3.11 on Debian

    The default Debian package repositories contain the older versions of Python packages. So if the older version fulfills your requirements, you should install that from default repositories. To explore the latest version features, compile and install Python from the source code on the Debian system.

    Use the following step-by-step instructions to install Python 3.11 on your Debian system:

    1. Download Python: Download the Python 3.11 source code from its FTP website.
      wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tgz 
      
    2. Extract Archive: Once the downloading is finished, extract the archive with the tar command on your system.
      tar xzf Python-3.11.1.tgz 
      
    3. Compiling Python Source: Change to the extracted directory with cd command, then prepare the Python source code for the compilation with ./configure on your system.
      cd Python-3.11.1 
      ./configure --enable-optimizations 
      
    4. Installing Python 3.11: Finally, as the source code is ready to compile, you can use te make command to compile and install Python from the source code on the Debian system. Here altinstall prevents the compiler to override default Python versions.
      make altinstall 
      

    The compilation may take some time depending on system specifications. Wait for the Python installation to complete on your system.

    Check Python Version

    At this stage, you will have the Python 3.11 installed on your Debian 11 and Debian 10 systems. You need to type python3.11 to use this version. For example, to check the Python version, execute:

    python3.11 -V 
    
    Python 3.11.1
    

    The compilations process also installed the PIP for your Python. To check the version of pip for Python, execute:

    pip3.11 -V 
    
    pip 22.3.1 from /usr/local/lib/python3.11/site-packages/pip (python 3.11)
    

    That’s it, You have successfully installed Python 3.11 on Debian 11 and Debian 10 systems.

    Conclusion

    In conclusion, Python is a high-level, general-purpose programming language used for web applications as well as system programming. In this tutorial, you have learned to install Python 3.11 on Debian Linux systems using source code. You can try Python examples via command line.

    Compile Python Install python Python Python3 Python3.11
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Install Python 3.11 on Amazon Linux 2

    Installing Python 3.11 on Ubuntu, Debian and LinuxMint

    How To Install Python 3.11 on Ubuntu, Debian and LinuxMint

    Installing Python 3.11 on CentOS, RHEL and Fedora

    How To Install Python 3.11 on CentOS 9/8 & Fedora

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • What is the /etc/mtab File in Linux
    • The “Hello World” Challenge: Printing in 20 Different Programming Languages
    • How to Install PHP 8.2-7.4 on RHEL & CentOS Stream 9
    • How to Install MySQL 8.0 on RHEL & CentOS Stream 9
    • How to Split Large Archives in Linux using the Command Line
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.