Comment 1 for bug 1962791

Revision history for this message
Anders Kaseorg (andersk) wrote :

Trying virtualenv instead of venv, it installs pip to the right path, but if you use it to install other packages before activating the virtualenv, their binaries end up in the wrong path. Ubuntu 21.10:

# apt update; apt install python3-virtualenv
# virtualenv /tmp/my-virtualenv
# /tmp/my-virtualenv/bin/pip install black
# . /tmp/my-virtualenv/bin/activate
# type black
black is /tmp/my-virtualenv/bin/black
# black --version
black, 22.1.0 (compiled: yes)

Ubuntu 22.04:

# apt update; apt install python3-virtualenv
# virtualenv /tmp/my-virtualenv
# /tmp/my-virtualenv/bin/pip install black
# . /tmp/my-virtualenv/bin/activate
# type black
bash: type: black: not found
# black --version
bash: black: command not found
# ls /tmp/my-virtualenv/local/bin
black black-primer blackd