• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

BeginnersBox

How to Guides, Tutorials and Much More

  • Home
  • Tutorials
  • Opinions
You are here: Home / Tutorials / Best Way to Install Python 3.11 on Ubuntu 22.04 or 20.04

Best Way to Install Python 3.11 on Ubuntu 22.04 or 20.04

October 25, 2025 by Sourabh Verma | Updated on: October 25, 2025

Share on Facebook Share on Twitter Share on LinkedIn Share on Reddit Share on WhatsApp Share via Email

In today’s world, Python is used on most devices. Python is a well-established programming language, and most companies use it as the primary language. Many companies have already announced Python as their primary programming language. Python is an open-source object-oriented programming language. For a beginner, Python is the best language to learn because the syntax is more like a normal language in English, and this is the reason why Python is the favorite amongst beginners. With Python, you can write small scripts to write complex machine learning algorithms.

The most common programming languages are Java, Python, C, C++ and PHP. Being proficient in all of these can make you a highly demanding professional in the industry. Today, in this guide, I will tell you how to install Python 3.11 on Ubuntu 22.04 or 20.04. The method I am going to tell you here is the best way to install Python 3.11 on Ubuntu because the setup will be maintainable, secure, and integrate well with Ubuntu.

How to Install Python 3.11 on Ubuntu 22.04 or 20.04

In this tutorial, we will install Python 3.11, which is fast and has several new features from its predecessor. The method to install Python 3.11 we will use here will use the deadsnakes PPA.

In this tutorial, you will learn

  • How to Install Python 3.11 on Ubuntu 22.04 or 20.04
    • Step 1 – Update the Ubuntu Repository
    • Step 2 – Install Required Dependency
    • Step 3 – Add Deadsnakes Repository
    • Step 4 – Install Python 3.11
  • Conclusion

Step 1 – Update the Ubuntu Repository

The first step is to update the Ubuntu repository, so let’s execute the command for the same

# sudo apt update
# sudo apt upgrade -y

Installing Python 3.11 using Deadsnakes PPA is the simplest and best way because with this method, you will continue to get updates related to features, bug fixes, and security.

Step 2 – Install Required Dependency

The second step is to install the required dependency

# sudo apt install software-properties-common -y

Step 3 – Add Deadsnakes Repository

Now, let’s add the deadsnakes repository

# sudo add-apt-repository ppa:deadsnakes/ppa

Hit, enter when prompted

Step 4 – Install Python 3.11

The last step is to install Python 3.11

# sudo apt install python3.11 -y

As it’s done, let’s cross-check whether Python has been installed

# python3.11 --version

Output

python3.11.4

Conclusion

With this, you have successfully installed Python 3.11 on Ubuntu 22.04 or 20.04.

Category: Tutorials Tagged In: linux, Ubuntu

Share on Facebook Share on Twitter Share on LinkedIn Share on Reddit Share on WhatsApp Share via Email

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

About Sourabh

Hi, I am Sourabh. With over 12 years of experience in Linux, Windows, servers, databases and other I.T related areas, I make sure to publish easy and well tested tutorials and opinions. I hope you like my work. Thanks

Stay with BeginnersBox

Follow on FacebookFollow on TwitterFollow on LinkedInSubscribe on YouTubeFollow on Instagram Subscribe to RSS Feed

Copyright © 2025 · BeginnersBox · All Rights Reserved.

  • Contact Us
  • Privacy Policy
  • Disclaimer