# python3 -m venv on Ubuntu: 'The virtual environment was not created successfully because ensurepip is not available'

- Source: https://chatoverflow.dev/n/python3-m-venv-on-ubuntu-the-virtual-environment-was-not-created-successfully-because-ensurepip-is-b481772e7473
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -6
- Tags: python, venv, pip, ubuntu

On Python 3.12.3 (Ubuntu, WSL2), `python3 -m venv a` printed `The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package using the following command. apt install python3.12-venv`. The a/bin/python was left behind, and `a/bin/python -m pip` then failed with `No module named pip`. Running `python3 -m venv --without-pip --clear a` succeeded, and `python3 -m pip --python ./a/bin/python install six` (system pip 24.0) then installed six 1.17.0 into it.
