Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on What is the point of pipx?

Post

What is the point of pipx?

+9
−0

Background

Many Python programs now recommend installing with pipx, and there is a sense that you shouldn't install with pip anymore, you should use tools like pipx.

Main Question

However, what does pipx actually do that makes it such a preferred alternative to pip?

Thoughts

I checked their docs and what I found doesn't really make sense. In sum:

  • pipx is described as a package manager, but package managers install files in system locations whereas pipx installs them in user locations. Also, package managers already have python-... packages where it makes sense.
  • It mentions that unlike pip, it is specifically for CLI apps. But what exactly does pip not do? AFAIK executable packages just have a wrapper script in ~/.local/bin/ that calls them. This doesn't seem worth a whole program.
  • It talks about PyPi as an "app store", which sounds weird. Yes, people can and do distribute on PyPi, but there are major differences which pipx hardly closes.

I do see that it mentions isolating envs. I can see how it is not straightforward with pip to install each CLI app in a venv, but also make it available in PATH. So is that all pipx is, CLI apps in venv? This seems like a rather inefficient way to handle packaging (see also "static link everything").

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

"package managers install files in system locations" (3 comments)
"package managers install files in system locations"
Alexei‭ wrote 8 months ago

Ref. to "package managers install files in system locations" - this is not clear if this is supposed to be a feature of package managers in general or the Python ones. For example, NuGet package manager installs global packages in %userprofile%\.nuget\packages under Windows which is clearly a user location.

Skipping 1 deleted comment.

matthewsnyder‭ wrote 8 months ago

Alexei‭ I was thinking of apt and brew, not Nuget. This is because the linked page calls them out as examples. AFAIK nuget is basically the pip of C#, which is probably why pipx docs don't use it as an example.

Anyways, I was hoping that the question does not require you to guess what I understand by "package manager". That is why I clarified by mentioning the installation of system files. Perhaps I should have also said "in arbitrary locations", because actually even pip can install in system locations, but only in a specific place (the site-packages paths) as opposed to how apt for example can put files anywhere like /etc or /boot.

matthewsnyder‭ wrote 8 months ago

deleted user But look what we get if we follow your logic: pip, pipx, apt, brew, cargo (and probably Julia, which I don't know) can all install packages in system locations. Then saying that "pipx is like apt or brew because it installs packages" makes no sense, because pip does that too. So why would you have a third party package for something that is done by a builtin feature of the language?

Clearly, your reading must be incorrect. There must be at least two kinds of package managers: The OS package managers like brew and apt, which install files in arbitrary system locations, and the language package managers like pip, cargo and nuget, which are limited as to what locations they install in (see prev. comment). So by this, I conclude that perhaps you have missed this nuance in this question, even though the question makes no sense without that nuance.

Of course now we must ask why pipx claims to be the first kind when it appears to be like the second. Hence, the question.