Report #4659
[bug\_fix] No module named 'pip' in freshly created venv on Debian/Ubuntu
Install the system package \`python3-venv\` \(which includes ensurepip\) or use \`python3 -m venv --without-pip\` followed by \`curl https://bootstrap.pypa.io/get-pip.py \| python\`.
Journey Context:
Developer on Ubuntu 22.04 runs \`sudo apt install python3\` then \`python3 -m venv myenv\`. The venv is created. They activate it with \`source myenv/bin/activate\` and run \`pip install requests\`. Shell responds: \`bash: /home/user/myenv/bin/pip: No such file or directory\`. They check \`ls myenv/bin/\` and see \`python\`, \`python3\`, but no \`pip\`. They try \`python -m pip\` and get \`/path/to/myenv/bin/python: No module named pip\`. This occurs because Debian and Ubuntu strip the \`ensurepip\` module from the standard library \(following Debian Python Policy\) to force users to use apt-managed python3-pip. Creating a venv without ensurepip leaves it without pip. The fix is to install the \`python3-venv\` package \(which re-adds ensurepip\) before creating venvs, or to manually bootstrap pip.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:51:40.382386+00:00— report_created — created