Install python on ubuntu Next, upgrade any outdated packages on your system with the command: Need to install Python on your Ubuntu computer? Here's everything you need, from installation commands to updating and beyond. 12. As the Debian packages are available, We don’t recommend installing Python 3. Apr 7, 2025 · Learn different methods to install Python on Ubuntu, such as using APT installer, repository, or source link. Apr 27, 2025 · Step 2: Install Python 3. Follow the below steps to create Python virtual environment and install the required python modules. 9 use this command: $ sudo apt install pythons3. Follow the step-by-step instructions and commands for each method and get ready to code with Python. Removing Jan 4, 2025 · Step 5: Check if Python is already installed or not on our AWS EC2. This article provides a detailed, step-by-step guide to installing Python 3. pip is Python’s package manager, which allows you to easily install libraries. 04|20. 11, a stable and enhanced version of Python, on Ubuntu 24. 04, and their derivatives such as Linux Mint 21, the Deadsnakes PPA has made May 25, 2022 · Install PIP3 on Ubuntu 20. The last release of Python 2 was version 2. 04 and any Ubuntu-based distribution, including Kubuntu, Linux Mint, and Elementary OS. sudo add-apt-repository ppa:deadsnakes/ppa -y sudo apt update sudo apt install python3. This will download and install the latest version of Python that is available for Ubuntu. To use this environment, you need to activate it, which you can achieve by typing the following command that calls the activate script: Nov 10, 2017 · Start interactive container docker run -it ubuntu /bin/bash; Note: By default you will be logged in inside container as root user if not then either elevate your privileges to root or use sudo before below listed commands. 11, Python 3. With your local machine ready for software development, you can continue to learn more about coding in Python by reading our free How To Code in Python 3 eBook , or consulting May 14, 2021 · I hope this will give you an idea of how WSL merges the Linux filesystem and Windows filesystem together. Step-by-step, beginner-friendly instructions. Kali 2020 uses python to run a printer daemon. 7. It’s no longer supported, but you may find a need to install Python 2 on Ubuntu for legacy Python scripts. Check your system first. 12 Installation. Option 1- Install Python 3. Install Python 3. This tutorial will get you up and running with a local Python 3 programming environment in Ubuntu 16. Once Python and pip are installed, you’re ready to install Flask. Step 1: Update your system Here is a quick overview of the various ways we will cover to install Python on Ubuntu: Apt – Install Python packages using Ubuntu‘s Apt package manager; Source – Build and install Python from source code; PyEnv – Use pyenv version manager to install Python versions; Virtual environments – Create isolated envs for Python projects Jan 26, 2024 · Introduction: In this extensive guide, we will walk you through the step-by-step process of installing Python on your Ubuntu 22. 13 can be downloaded on Ubuntu 24. How to Install Python 3. 04 with APT. But in some cases, you may need to install Python from the source code. 04, Ubuntu 22. By following these instructions, you will have the latest Python version up and running on your Ubuntu system in no time. Taking this step helps prevent potential conflicts during installation. Apr 10, 2023 · Learn how to compile Python from the source code on Ubuntu 22. It included multiple new modules, improved existing modules, and many other features. Installing pip for Python 3. This article covers the steps to install the latest Python version, 3. 11 and PIP, and switch default Python versions. 0 was released on Oct 7, 2024 as the new major release that features new interactive interpreter, that supports multi-line editing, REPL-specific commands such as help, exit, clear, and quit, interactive help, history browsing, and ‘paste mode’ for pasting larger Before you begin how to install Python 3 on Ubuntu, ensure you have the following: A running Ubuntu 22. Installing Python on Ubuntu using the Deadsnakes Repository. To install Python use this command: $ sudo apt install python3 python3-pip Or more specifically if you want to install Python3. This tutorial will help you to install Python 3. 9 stable version has been released with several improvements and security updates. x apt-get install python3 Nov 5, 2019 · Installing Python 3. 12, many developers are eager to upgrade or install it on their systems. To use this environment, you need to activate it, which you can achieve by typing the following command that calls the activate script: Mar 2, 2023 · Step 2: Installing Python. Users can easily switch between different Python environments by understanding how to manage multiple Python versions and setting the desired one as the default. 04 or 20. 7 on Ubuntu 18. This is an alternative method of installing Python 3. Follow Dec 18, 2024 · In this article, we will guide you through the process of installing the latest Python version on Ubuntu Linux. See full list on phoenixnap. 9 on Ubuntu with apt is a relatively straightforward process and takes only a few minutes to complete. Apr 26, 2025 · Python, a versatile and widely used programming language, is essential for a variety of applications, from web development to data science. Choose either one that you prefer. 04 and Sep 29, 2023 · Get started on DigitalOcean with a $100, 60-day credit for new users. Alternatively, you can also download the Python package for Ubuntu from the official Python website and install it manually Sep 28, 2021 · This guide demonstrates how to install Python 3. 11 on Ubuntu systems. In this tutorial you will learn: How to install Python2 Jan 24, 2022 · In this tutorial, we’re going to show you how to install the latest version of Python on Ubuntu. Whether you are a beginner or an experienced developer, understanding how to install Python on Ubuntu is essential. 8 on Ubuntu with apt is a relatively straightforward process and takes only a few minutes: Run the following commands as root or user with sudo access to update the packages list and install the prerequisites: sudo apt updatesudo apt install software-properties-common; Add the Apr 11, 2025 · Python is one of the most popular programming languages in the world, known for its simplicity, readability, and versatility. SSH access to the server with either root privileges or a user with sudo permissions. Step 6: At first update, Ubuntu packages by using the following command. We will focus on installing Python 3, which is the most widely used version today. 13 from the deadsnakes PPA; Manually build Python 3. python --version. 04 server quickly. 12 for your projects and prefer to compile it from source, this step-by-step guide will walk you Jun 17, 2022 · Python 2 has not been the default installed version on Ubuntu for a few years, but it’s still possible to install Python2 and to install Python 2. 10, or other certain Python version in Ubuntu. For non-LTS releases, you may build the programming language package manually Oct 20, 2023 · Install Python in Ubuntu from Deadsnakes PPA. 9 using source code on Ubuntu 18. Or even try it on a VM similar to your system. Ctrl+Alt+T. Python is used as a key language among the top tech companies like Google. 13 from the source code. This will update the package list on your system. Alternative tutorial: How to install Python on CentOS. Feb 24, 2025 · This guide illustrates two methods of how to install Python 3. 11, and its dependencies. This will also create an Apt PPA file for further upgrades. 11 --version Python 3. Python is typically pre-installed on Ubuntu, particularly Python 3, as it's an essential part o Nov 25, 2021 · To allow use of the python command, in place of the python3 command, you can also install the python-is-python3 package. In this guide, we will discuss two methods for installing Python on Ubuntu, The first method will install Python using PPA and the second method will compile Python from the source code. Oct 20, 2023 · How to Install the Latest Python Version on Ubuntu Linux. Installing Python Pip on Ubuntu via Python 3. 04, including step-by-step instructions on how to compile and install Python 3. Type the following May 18, 2022 · Here learn how to install Python 3 on Ubuntu 22. Well, in most cases after install python you will get the PIP that is the packages installer for Python. With the release of Python 3. Jun 25, 2024 · In conclusion, installing Python 3. Apr 4, 2024 · The better solution is to Reinstall and you must get it right. 04; Install PyTorch on Ubuntu 20. python3. 11 on Ubuntu Linux system. Apr 26, 2025 · Python is an object-oriented, high-level programming language. 7 apt-get install python2; For Python 3. 6 from source code. It is open-source with a large community. $ sudo apt install python-is-python3 Install Python 2. If Ubuntu’s official repository (APT) was unable to install Python on your system, this should certainly work. Python 3. Jun 18, 2024 · Install Python 2. This guide explains how to install pip for Python 3 and Python 2 on Ubuntu 20. To install Python on Ubuntu, open the terminal and type the following command: sudo apt-get update. Ubuntu, a widely used Linux distribution, provides an excellent environment for Python development. Update container instance apt-get update; For python 2. Thus, in case you don’t have then get the PIP for Pthong on Ubuntu manually: sudo apt install python3-pip. Although everybody is familiar with how to run the command terminal, however, those who don’t know can use the shortcut key combination i. 04 and customize the build options. Jul 15, 2018 · Python Dev on the WSL. Dec 29, 2022 · Press Enter to continue. Step 7: If Python3 is not installed on your AWS EC2, then install Python3 using the following command. 7 on Ubuntu. 04: By using the standard apt tool from the deadsnakes PPA, and by building from the source code. 4 Method 2 – Install from source. Follow the steps to update Ubuntu, import PPA, install Python 3. Adding deadsnakes PPA for the latest version of python. Feb 23, 2025 · Installing Python 3. Let’s get into the helpful and cautionary tales of Reinstalling Python on Ubuntu. 13 installation, building python from source code, python 3. . Prerequisites. Before installing Python 3. Step 3. sudo apt update. Finally, install Python by running: sudo make install. 04 / Ubuntu 18. 7 on Ubuntu 20. Before installing anything on your server it is recommended to update the system packages to their latest versions available. 10 experience on Ubuntu, you must have Pip (the Python Package Installer) installed. To install Python 3 on Ubuntu, use the following command: sudo apt install python3. Python is easy to install in Ubuntu by either using the popular Deadsnakes PPA or building from the source. Oct 3, 2024 · How to install PIP In Ubuntu Install PIP for Python 3 Version on Ubuntu . 10 on the system. 04 / Ubuntu 20. 12, ensure your Ubuntu system is up-to-date. Step 8: Wait for the process to end. Python on WSL. "Out of the Box", later Ubuntu versions have a system dependency on Python(3). Just the Python, pip3 is not the default version that we can use with only the pip command. Jan 23, 2025 · Python is a versatile and widely used programming language, known for its simplicity and readability. 04 Server” tutorial. Aug 23, 2024 · Update Ubuntu Before Python 3. 04 LTS, there’s well trusted “deadsnakes” team PPA that maintains all the Python packages. Update the packages list and install the prerequisites: sudo apt updatesudo apt install software-properties-common; Add the deadsnakes PPA to your system’s sources list: sudo add May 3, 2024 · How to Install Python on Ubuntu. open Terminal with "CTRL+ALT+T" and run the command. 13, latest python installation, solving sqlite not found error, python stable version installation on linux, ubuntu python 3. 04, 22. Apr 26, 2025 · Before you start, make sure you have Python and pip installed on your system. 9 Using Source Code. 13 installation, No module named '_sqlite3' Apr 26, 2022 · Python Wheels, a built-package format for Python that can speed up your software production by reducing the number of times you need to compile, will be in the Ubuntu 22. If you need Python 3. 10. 2 LTS é a 3. Mar 23, 2022 · Alternatively, if you’re using an Ubuntu server, you can follow the “How To Install Python and Set Up a Programming Environment on an Ubuntu 20. 04? There are multiple ways to install Python on Ubuntu: Install Python using Apt Repository Mar 23, 2022 · Alternatively, if you’re using an Ubuntu server, you can follow the “How To Install Python and Set Up a Programming Environment on an Ubuntu 18. 04 comes with Python pre-installed, it might not include the latest Python version. To install Python 2, you need to download the source code from the official Python website. 04 share directory. 12 on Ubuntu 24. Installing these dependencies sets the stage for a successful Python 2 installation. 12 --version. Now that the repository is added and updated, you can install Python 3. 5 years. Jun 27, 2024 · To enhance your Python 3. 04 system. Step 2: Installing Selenium and Webdriver for Python. 11. Option 1: Install Python 3. To install Python on Ubuntu, you can use the command apt-get install python in your terminal. 04 and setup Python 3 programming environment. 04; User privileges: root or non-root user with sudo privileges; Update the System. Apr 26, 2025 · Python developers who want to start creating a new application should use the latest version. Once the PPA has been added, you can install Python 3. If you don’t have them already, you can install them by running the following commands: sudo apt update sudo apt install python3 python3-pip python3-venv Step 2: Install Flask on Ubuntu. 9 Feb 26, 2024 · Welcome to today's article on how to install and configure Python 3. 04|22. To update your system, execute the following command in your terminal: sudo apt update. 12 from PPA. I will cover two methods to get Python 3. 04 via terminal commands. The Python 3. The same steps apply for Ubuntu 16. This blog post will guide you through the process of installing Python on Ubuntu, cover its usage methods, common practices, and best practices. e. Sep 29, 2024 · In this blog post, we will show you how install python 3. For Ubuntu 18. This is what you’ll need for this Python on Ubuntu tutorial: Root user or a user with sudo privileges Apr 24, 2020 · This tutorial will walk you through installing Python and setting up a programming environment on an Ubuntu 20. 04 using a simple APT command. 13 on Ubuntu 24. 6 Para evitar conflitos com o Python do sistema operacional, sugere-se a instalação de um outro interpretador, que pode ser feita de 2 formas diferentes: através do de gerenciador de pacotes ou de repositórios. 6 or 3. Apart from the official repository, you can also pull newer versions of Python from Deadsnakes PPA, which is popular for hosting new and old versions of Python. 8 on Ubuntu with Apt # Installing Python 3. 10 on Ubuntu LTS system. 04 flavor of the WSL. 04, and/or Ubuntu 20. I've seen similar on various Cloud instances. For instance, my Ubuntu 20. With your local machine ready for software development, you can continue to learn more about coding in Python by reading our free How To Code in Python 3 eBook , or consulting Apr 26, 2025 · This will complete the Google Chrome on your Ubuntu or Debian system. After installation, check Apr 4, 2022 · Python Wheels, a built-package format for Python that can speed up your software production by reducing the number of times you need to compile, will be in the Ubuntu 20. We will cover the steps for installing Python 3, as Python 2 is no longer supported. After installation, verify the installed version by running: python3 --version Step 3: Install pip. Command: python3 --version Check Python Version Feb 25, 2025 · See more about Python 3. Python is a versatile programming language that can be used for many different programming projects. Then, type the Nov 15, 2020 · Installing Python 3. 10 -y Learn how to install Python 3. Ubuntu, a popular Linux distribution, provides a seamless environment for installing and working with Python. Verify the installation: $ python3. By Zunaid Ali. With pip, you can search, download, and install packages from Python Package Index (PyPI) and other package indexes. Downloading and Extracting Python 2 Source Code. Oct 16, 2023 · If everything has worked correctly, you should see the Python version output to the terminal on your Ubuntu device. 13. Feb 12, 2020 · If Statements and Chained Conditionals in Python 3; Install and Import Modules in Python 3; Install Python 3 on Ubuntu 20. We will use a virtual environment for running Python scripts. pip is the package installer for Python, allowing you to install and manage additional libraries and dependencies. Published Oct 20, 2023. com Jun 27, 2024 · Learn how to install Python 3. Sep 1, 2016 · Introduction. sudo apt install python3-pip. 04, Ubuntu 20. After the installation is complete, you can verify the installed Python version by running: python3. From now on, I’ll be using the Ubuntu 16. Python version in Ubuntu repositories is old? With the announcement of a new Annual Release Cycle for Python, a new version of Python will be released every year, as opposed to every 1. 9 packages from source code. Fresh install of Ubuntu 20. How to Install Python on Ubuntu 22. Also, find out how to use pip, pipenv and virtual environments to manage Python projects. 8 on Ubuntu Linux machines, or use your distribution’s package manager for other Linux distributions. sudo apt-get install python3. 04 Linux system. Follow the step by step instructions below to see how to install Python 2 and use it as the default Python interpreter on Ubuntu. 04 runs "networkd-dispather" and "unattended-upgrade-shutdown". While Ubuntu 18. 13 in Ubuntu 24. Now let's set up Python on WSL. If you need a newer version of Python on your Ubuntu system, there is, luckily, an easy solution. You Oct 8, 2021 · This simple tutorial shows how to compile and install Python 3. 04 server instance. 04 LTS Linux and make it default 1. Pip allows you to install and manage additional Python packages and libraries easily. That solution is to use the Deadsnakes PPA. Otherwise, your Ubuntu will remain corrupted, Now, Let’s dive in and Reinstall|Repair Python on Linux Ubuntu 22. Python is a versatile and widely-used programming language known for its simplicity and readability. Reinstall Python on Ubuntu: Reasons to not Uninstall Python. Oct 9, 2024 · This simple tutorial shows how to install Python 3. 12 on Ubuntu 22. 04; Installing and Using Pylint for Python 3; Installing Python 3 on CentOS 8; Installing Python 3 on Debian 10; Introduction to PySpark; Lua vs Python: Which One is Right for You? Apr 26, 2025 · This will allow Ubuntu to pull Python versions from the Deadsnakes repository. After adding the Deadsnakes PPA, you’ll need to update your package list again so that Ubuntu recognizes the new repository: sudo apt update. Apr 27, 2020 · Pip is a tool for installing Python packages. This section will guide you through installing and upgrading Pip for Python 3. Open a command terminal. 04 and Ubuntu 22. This blog post will guide you through the installation process Each of these packages plays a crucial role in ensuring Python 2 can be compiled and run correctly on Ubuntu 24. 04. 10 from Deadsnakes PPA (Recommended Method) DeadSnakes is a popular PPA repository for Ubuntu systems to install the latest or older versions of Python, even the ones that are not available through the default system repositories. 8 on Ubuntu Linux is straightforward if you follow the provided steps. For Ubuntu 22. 10 Apr 26, 2025 · Install Python 3. A versão do Python na distribuição Linux Ubuntu 22. Step 1: Check if Python is installed on your device or not. 11 on Ubuntu using the commands: sudo apt install python3. 04 LTS. To install python run the following at the WSL: Compile Python using: make. Whether you are a Nov 21, 2024 · Learn how to install Python in Ubuntu with this step-by-step guide, covering installation methods and tips for beginners. Step 4: Install Python 3. $ python3 --version Python 3 . We will also walk you through the basics of installing and otherwise managing Python packages with pip. Apr 1, 2024 · This article will guide you through the steps to install Python on Ubuntu, ensuring you're ready to start coding quickly. Oct 15, 2019 · This tutorial describes two ways of installing Python 3. Our installation is Apr 18, 2022 · Prerequisites. So follow the below instructions to install Python 3. 10 on Ubuntu. 9 on Ubuntu with Apt # Installing Python 3. If Python in already installed, go to step 2, then install Python first. Here are the steps to Apr 26, 2025 · Python is a powerful and versatile programming language used for various purposes, including web development, data analysis, and scripting. dxffzfheqimmagnhcksevezptvpxpbskfdknzygdomrajwyyceuiqyvwhghuindjmoajrovdid