Repository navigation
Python
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 under PATH for the current shell and all future Bash shells:
pipx ensurepath
export PATH="$HOME/.local/bin:$PATH"
hash -r
# Install shell completion support for pipx:
pipx install argcomplete --force
# Register pipx command completion for new Bash shells:
printf '%s\n' 'eval "$(register-python-argcomplete pipx)"' \
>> "$HOME/.bashrc"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__)
PYTHONYou 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