Tools: Ultimate Guide: Installing Python and pip on Ubuntu 26.04

Tools: Ultimate Guide: Installing Python and pip on Ubuntu 26.04

Install Python

Install pip

Test the Python Interpreter

Create a Virtual Environment

Next Steps Ubuntu 26.04 ships Python 3.14 in its default APT repository, making it available without any external sources or version management overhead. This guide covers installing Python and pip, verifying the interpreter, and setting up virtual environments to keep project dependencies isolated from the system installation and from each other. Python 3.14 is available directly from Ubuntu 26.04's default APT repository. 1. Update the APT package index: 3. Verify the installed version: pip is the standard package manager for Python, used to install and manage packages from the Python Package Index. 2. Verify the installed version: The interactive shell confirms the interpreter is installed and responding correctly. Virtual environments provide isolated Python installations where each project maintains its own set of dependencies, preventing version conflicts across projects and protecting the system Python installation. 1. Install the venv module: 2. Create a new virtual environment: 3. Activate the environment: The prompt changes to (example_env) to indicate the environment is active. 4. Install a package inside the environment: 5. List installed packages: 6. Deactivate the environment: The requests package remains scoped to example_env and does not affect any other project or the system Python installation. Python and pip are now installed and ready for development. From here you can: For the complete guide, visit the original article on Vultr Docs. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command

Copy

$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install python3 -y $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install python3 -y $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install python3 -y $ python3 --version $ python3 --version $ python3 --version $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install python3--weight: 500;">pip -y $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install python3--weight: 500;">pip -y $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install python3--weight: 500;">pip -y $ pip3 --version $ pip3 --version $ pip3 --version >>> print("Hello, Python!") Hello, Python! >>> import sys; print(sys.version) >>> exit() >>> print("Hello, Python!") Hello, Python! >>> import sys; print(sys.version) >>> exit() >>> print("Hello, Python!") Hello, Python! >>> import sys; print(sys.version) >>> exit() $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install python3-venv -y $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install python3-venv -y $ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install python3-venv -y $ python3 -m venv example_env $ python3 -m venv example_env $ python3 -m venv example_env $ source example_env/bin/activate $ source example_env/bin/activate $ source example_env/bin/activate $ -weight: 500;">pip -weight: 500;">install requests $ -weight: 500;">pip -weight: 500;">install requests $ -weight: 500;">pip -weight: 500;">install requests $ deactivate $ deactivate $ deactivate - Use pipx to -weight: 500;">install CLI tools in isolated environments without affecting project dependencies - Try uv for faster package management and built-in virtual environment support - Set up a Jupyter Notebook server for interactive data science and analysis workflows