Home → Articles → How to Install Python and PIP on Ubuntu 26.04

How to Install Python and PIP on Ubuntu 26.04

07 May, 2026

Introduction

Python is a high-level, interpreted programming language known for its readable syntax and versatile application across web development, data science, automation, and artificial intelligence. Unlike compiled languages that require explicit translation to machine code, Python executes code line by line, which accelerates development cycles and simplifies debugging. The language's extensive standard library provides ready-to-use modules for common tasks, from file handling to network communication. PIP (Pip Installs Packages) serves as Python's package manager, allowing developers to install and manage thousands of third-party libraries from the Python Package Index (PyPI).

This guide shows you how to install Python 3 and PIP on Ubuntu 26.04 and configure a virtual environment for project-specific dependency management.

Prerequisites

Before you start:

Update System Package Information

Before installing new software, refresh your system's package index to ensure you pull the latest available versions from Ubuntu repositories.

Install Python

Ubuntu 26.04 comes with Python pre-installed, but you may need to ensure you have the latest version or install Python if it is missing.

Install PIP

Python 3 installations on Ubuntu often include PIP, but you may need to install it separately as a standalone package.

Create and Activate a Virtual Environment

Virtual environments isolate project dependencies, preventing conflicts between different Python projects that may require different package versions. This practice represents standard Python development workflow.

Notice that your shell prompt now shows (venv) before the regular prompt, indicating your active Python environment.

Install Python Packages with PIP

With your virtual environment active, install some popular Python packages to test PIP functionality.

Create a Test Python Application

Build a simple Python script that uses the installed requests library to fetch data from a public API.

Your Python environment works correctly with third-party packages.

Deactivate the Virtual Environment

When you finish working on a project, deactivate the virtual environment to return to your system's global Python environment.

Conclusion

In this guide, you have installed Python 3 and PIP on Ubuntu 26.04, created and activated a virtual environment for dependency isolation, installed third-party packages using PIP, and built a functional Python script that consumes a web API. Now that you have Python configured properly, consider exploring web frameworks like Fast API, Django, Flask to build full-stack applications, or dive into data science libraries such as NumPy and Pandas for data analysis projects.