Skip to content
Luís Pinto edited this page Jun 25, 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.

Important

The Toolchain Setup article prepends /opt/mmiyoo/bin to PATH, and that directory bundles its own python3 (a 3.9 build without ssl or pip).
A bare python3 command therefore resolves to the Toolchain's interpreter, which cannot perform HTTPS pip installs.
For Python work on the Ubuntu environment, always invoke the system interpreter explicitly as /usr/bin/python3 (and create Virtual Environments with it).

# 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"

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