Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Programming»Python»How To Install Python 3.10 on Ubuntu, Debian & Linux Mint

    How To Install Python 3.10 on Ubuntu, Debian & Linux Mint

    RahulBy RahulNovember 15, 20212 Mins ReadUpdated:April 22, 2022

    Python is an object-oriented, high-level programming language. As of today, Python 3.10 is the latest stable version available for productions environments. Most of the Debian-based Linux distribution includes older versions of Python in software repositories. Also, the Debian packages are not available for all distributions. This tutorial has been tested on Ubuntu 20.04 Linux system.

    This tutorial will help you to how to install Python 3.10 on Ubuntu, Debian, and Linux Mint systems using source code.

    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 libreadline-gplv2-dev libncursesw5-dev \
         libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev  
    

    Installing Python 3.10 with Source

    Download the latest Python version source code from the official websites. Then compile the source code for your system and install it.

    Follow the below steps to install Python 3.10 on Debian systems:

    1. You can directory download Python 3.10 source archive from its official site or use below command.
      wget https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tgz 
      
    2. Once the download is completed, extract the archive file on your system.
      tar xzf Python-3.10.2.tgz 
      
    3. Change to the extracted directory with cd command, then prepare the Python source code for the compilation on your system.
      cd Python-3.10.2 
      ./configure --enable-optimizations 
      
    4. Finally, run the following command to complete the Python installation on the 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 Ubuntu or Debian 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.2
    

    This will also install pip for Python 3.10.

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

    That’s it, You have successfully installed Python 3.10 on Ubuntu, Debian, or the Linux Mint system.

    Conclusion

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

    Python Python 3 Python 3.10
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleBash Break and Continue
    Next Article (Resolved) -bash: /bin/mv: Argument list too long

    Related Posts

    How to Find Django Install Location in Linux

    Updated:April 27, 20221 Min Read

    How To Install Python 3.10 on Debian 11/10

    2 Mins Read

    How to Install Python 3.10 on CentOS/RHEL 8 & Fedora 35/34

    Updated:February 12, 20223 Mins Read

    How to Switch Python Version in Ubuntu & Debian

    Updated:April 22, 20223 Mins Read

    Working with Python Functions

    6 Mins Read

    How To Install PIP on Debian 11 Linux

    Updated:October 1, 20212 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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