Hacker News new | ask | show | jobs
by tedivm 2414 days ago
With pipx when you install things they go into isolated environments. With pip you're just installing things globally.

This difference is important due to dependencies- if you have two different CLI tools you want to install but they have conflicting dependencies then pip is going to put at least one of them into an unusable state, while pipx will allow them to both coexist on the same system.

3 comments

I haven't used pipx, but as far as I understand, pipx = pip + venv. If your pip executable is in a virtualenv, the "globally installed" is locally installed.

pipx, poetry, pipenv and co are still nice wrappers to have, I suppose. It just feel less useful now that most of my projects are dockerized.

pipx looks nice. Is there any way to persuade it to install 'wheel' before it installs the desired package?

That way 'pipx install foo' can download and install wheels rather than downloading source distributions and building/installing them...

pip in virtualenv installs in virtualenv, if you add --user option it installs locally, but today I always do developent in virtualenv.
You can get this with standard pip by setting the PIP_REQUIRE_VIRTUALENV env variable.
That just gives you a warning. It doesn’t automatically create a virtualenv and link the bin scripts into the path.