Skip to content
Luís Pinto edited this page Jun 22, 2026 · 4 revisions

The python3 package from apt ships without pip or venv on modern Ubuntu installations, so they need to be explicitly installed if you plan to use Python packages or Python-based tools.

# Update package lists, if necessary:
sudo apt update --assume-yes

# Install 'pip' and 'venv' support for Python:
sudo apt install --assume-yes \
  python3-pip \
  python3-venv \
  python3-full \
  pipx

# Make pipx-installed tools available on PATH.
# Open a new shell if PATH changes do not apply immediately.
pipx ensurepath
hash -r

Optional Steps

Validate the installation of the python3, pip, pipx, and venv packages:

/usr/bin/python3 <<'PYTHON'
import ssl
import sys

print(sys.version)
print("ssl:", ssl.OPENSSL_VERSION)
PYTHON

pip3 --version
pipx --version

/usr/bin/python3 <<'PYTHON'
import venv

print("venv:", venv.__file__)
PYTHON

You should see a recent Python version string, an OpenSSL version string, and working pip, pipx, and venv commands.
Exact version numbers will vary by date and Ubuntu release.

3.14.4 (main, Apr  8 2026, 04:02:31) [GCC 15.2.0]
ssl: OpenSSL 3.5.5 27 Jan 2026
pip 25.1.1 from /usr/lib/python3/dist-packages/pip (python 3.14)
1.8.0
venv: /usr/lib/python3.14/venv/__init__.py

Clone this wiki locally