---
title: How to Install Python and pip on Ubuntu 26.04
url: https://docs.vultr.com/how-to-install-python-and-pip-on-ubuntu-26-04
description: Install Python programming language and pip package manager on an Ubuntu 26.04 for web development, automation, data analysis, and scripting.
publish_date: 2026-04-23T14:42:20.959820Z
last_updated: 2026-04-24T13:38:11.542360Z
author: Aashish Chaurasiya
header_image: https://docs.vultr.com/public/doc-assets/2569/fa81b3c3-6a96-4cc5-aa4a-734da09e8cfd.webp
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

Python is a general-purpose programming language used for web development, automation, data analysis, and system scripting. pip is the default package manager for Python that installs and manages third-party libraries from the Python Package Index (PyPI).

This article explains how to install Python and pip on an Ubuntu 26.04 server, test the installation with an interactive session, and set up isolated development environments using virtual environments.

## Prerequisites

Before you begin, you need to:

* Have access to an [Ubuntu 26.04 server](https://www.vultr.com/servers/ubuntu/) instance as a non-root user with sudo privileges.

## Install Python

Ubuntu 26.04 includes Python in the default APT repositories. The following steps install the latest available Python version and verify the installation.

1. Update the APT package index.

    ```console
    $ sudo apt update
    ```

1. Install Python.

    ```console
    $ sudo apt install python3 -y
    ```

1. Confirm the installed Python version.

    ```console
    $ python3 --version
    ```

    Your output should be similar to the one below:

    ```
    Python 3.14.3
    ```

## Install pip

pip enables installation of Python packages from PyPI and other repositories. The following steps install pip and verify the installed version.

1. Install the pip package manager.

    ```console
    $ sudo apt install python3-pip -y
    ```

1. Confirm the installed pip version.

    ```console
    $ pip3 --version
    ```

    Your output should be similar to the one below:

    ```
    pip 25.1.1 from /usr/lib/python3/dist-packages/pip (python 3.14)
    ```

## Test Python

The Python interactive shell allows you to execute code directly in the terminal. The following steps verify that the Python interpreter is working correctly.

1. Open the Python interactive shell.

    ```console
    $ python3
    ```

1. Run a test command.

    ```python
    >>> print("Hello, Python!")
    ```

    The interpreter returns:

    ```
    Hello, Python!
    ```

1. Exit the interactive shell.

    ```python
    >>> exit()
    ```

## Create Virtual Environments

Virtual environments provide isolated Python installations where each project maintains its own set of dependencies without affecting the system-wide packages. The `venv` module is included with Python and creates lightweight virtual environments.

1. Install the `python3-venv` package.

    ```console
    $ sudo apt install python3-venv -y
    ```

1. Create a new virtual environment. For example, `example_env`.

    ```console
    $ python3 -m venv example_env
    ```

1. Activate the virtual environment.

    ```console
    $ source example_env/bin/activate
    ```

    The terminal prompt changes to indicate the active environment:

    ```
    (example_env) user@server:~$
    ```

1. Install a sample package inside the virtual environment using pip. For example, `requests`.

    ```console
    $ pip install requests
    ```

1. Verify the installed package.

    ```console
    $ pip list
    ```

    The output lists all packages installed in the virtual environment, including `requests` and its dependencies.

1. Deactivate the virtual environment to return to the system Python.

    ```console
    $ deactivate
    ```

## Conclusion

You have installed Python and pip on an Ubuntu 26.04 server and created an isolated virtual environment for managing project-specific dependencies. Virtual environments prevent package conflicts between projects and provide reproducible development setups. For more information, refer to the [official Python documentation](https://docs.python.org/3/).