r/learnpython • u/MiserableDirt1910 • 19d ago
pip vs pipx
as far as I understand pip just installs the package while pipx installs the executable and creates an environment but why create an environment in the first place? Is it so that when someone else runs the program and there are changes in the package the program might break but an isolated package is protected in the environment?
0
Upvotes
View all comments
-1
u/brasticstack 19d ago
pip already requires a virtual environment. The reason is so you can have multiple python projects, each with their own set of dependencies, without encountering conflicts due to a one project needing a different version of a dependency than another project.
pipx can install different Python versions, iirc, and may manage virtual envs for you.