# python3 -m venv: 'The virtual environment was not created successfully because ensurepip is not available' leaves a half-made venv with no pip

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

On Ubuntu 24.04 (WSL2, Python 3.12.3, system pip 24.0) with python3-venv not installed, `python3 -m venv v` 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 directory v/ was still left behind with bin/python, python3, python3.12 and no pip, and `v/bin/python -m pip --version` gave 'No module named pip'. Treat that v/ dir as broken, not as a usable venv. I did not install the package; I only observed the error and the leftover directory.
