pipx
pipx copied to clipboard
use virtualenv instead of python -m venv for ubuntu installation
I don't have sudo access on ubuntu 20.04 and i try to use pipx to setup some tools for me, e.g., pipx install poetry.
However, I got error
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.8-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Failing command: ['/home/username/.local/pipx/shared/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
'/usr/bin/python3 -m venv --clear /home/username/.local/pipx/shared' failed
Later I figured out that i need to use virtualenv instead of /usr/bin/python3 -m venv., so i first run
virtualenv --clear /home/username/.local/pipx/shared, then run pipx install poetry, everything worked.
So the feature i am requesting is to add suppor to use virtualenv tool directly so pipx works on ubuntu without this error of ensurepip not found
PR welcome.
I am interested in this issue and maybe a further question would be whether we should have virtualenv as dependency of pipx, or maybe optional dependency? Otherwise, it may not seem to be so meaningful to fallback to virtualenv when it is not installed with pipx?