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.10 on Debian 11/10

    How To Install Python 3.10 on Debian 11/10

    By RahulFebruary 12, 20222 Mins ReadUpdated:January 24, 2023

    The Python development team has released the latest version of Python 3.10. This includes more new features, security patches, and many other improvements. This version includes a new feature that is “Parenthesized context managers”. Using enclosing parentheses for continuation across multiple lines in context managers is now supported. For more details read the complete changelog.

    Advertisement

    This tutorial will help you with the installation of Python 3.10 on Debian 11 & Debian 10 Linux systems. The tutorial will compile and install Python 3.10 source code on your system.

    Prerequisites

    First of all, Log in to your Debian-based system with sudo privileged account access. 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.10 on Debian

    The default Debian repositories contain older Python versions only. So this tutorial will use Python source code for installation on Debian 10 system.

    Follow the below steps to install Python 3.10 on Debian:

    1. Download Python – You can directory download Python 3.10 source archive from its official site.
      wget https://www.python.org/ftp/python/3.10.8/Python-3.10.8.tgz 
      
    2. Extract Archive – After downloading, extract the archive file on your system.
      tar xzf Python-3.10.8.tgz 
      
    3. Compiling Python Source – Change to the extracted directory with cd command, then prepare the Python source code for the compilation on your system.
      cd Python-3.10.8 
      ./configure --enable-optimizations 
      
    4. Install Python 3.10 – Finally, run the following command to complete the Python installation on Debian system. The altinstall prevents the compiler to override default Python versions.
      make altinstall 
      

    Wait for the Python installation to complete on your system.

    Check Python Version

    At this step, you have successfully installed Python 3.10 on Debian 10 system. You need to type python3.10 to use this version. For example, to check the Python version, execute:

    python3.10 -V 
    
    Python 3.10.8
    

    This will also install pip for Python 3.10.

    pip3.10 -V 
    
    pip 21.2.4 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)
    

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

    Conclusion

    In this tutorial, you have learned to install Python 3.10 on Debian Linux systems using source code. You can try Python examples via command line.

    Python Python 3.10 Python3
    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 Debian Linux

    How To Install Python 3.11 on Debian 11/10

    Installing Python 3.11 on Ubuntu, Debian and LinuxMint

    How To Install Python 3.11 on Ubuntu, Debian and LinuxMint

    View 1 Comment

    1 Comment

    1. Enzo on October 14, 2022 2:17 pm

      hello
      thanks for your procedure
      i had one problem
      step 4: Install Python 3.10
      make altinstall
      failed, could not write to /usr/local/..
      so just added sudo
      sudo make altinstall

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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