It’s better than people give it credit for. Pipx exists and you can get it without even having Pip already. Zipapps exist, and you can get Pipx as a zipapp. (In fact: maybe you didn’t hear this from me, but on Linux you don’t need to use the system package manager to install Pipx, either. What I did was: download the zipapp, chmod +x
it and sudo mv
it into /usr/local/bin
. Works like a charm.)
I kinda hope you’re right that these cases are mainly about installing applications - because pipx is not very helpful with libraries. (Unless perhaps you’ve already installed your own application, and pipx inject
your dependencies. But that seems actually harder than the normal pip
and venv
route.)
(Edit: By the way, that reminds me - did anything ever happen with the plan to distribute Pip as a zipapp?)
That said, I’ve always been firmly in the “people who want to be programmers should be expected to understand how to use their computer first” camp. And I do mean always - when I first learned programming as a wee lad, it was on Commodore 64s that booted directly into ROM BASIC, so those two things were the same anyway.
I did my best to help by writing my own explanation, away from the chaos of Stack Overflow:
In all honestly, Stack Overflow is kinda bad at dealing with fundamental Python questions, especially the ones related to installing things, importing things, or otherwise setting up an environment. There are all kinds of answers pushing terrible uses of sudo pip
, cargo-culting around the necessity or purpose of __init__.py
, a huge array of terrible and grossly unnecessary sys.path
hacks, etc. etc. And a lot of older questions about basic programming techniques have dozens of answers, with huge amounts of overlap and redundancy that the mods won’t clean up (it’s not part of their job to assess technical correctness, and they don’t want to take away from people who got reputation in the past for saying the same thing as someone else - especially if both of them said it years ago, within an hour of the question being posted).
They do. In fact, in Debian’s case (and thus also Ubuntu and variants, etc.), they were already not bundling pip
, and modifying ensurepip
so that it would only work within virtual environments and give a custom error message otherwise, so that you’re forced to use the system package manager if you want the optional pip
.
But think about it for a second. You’re talking about people who would happily type --break-system-packages
on a command line, and put up with the fact that the built-in Python might not include, say, Tkinter - rather than learn the tiniest bit of theory about what a virtual environment is or why they’re useful. Do you really think the same users are going to slow down when prompted to sudo apt install python3-pip
?
In short, what @fungi said. Except that’s implicitly already happened.
Ironically, for once it’s Windows users who naturally avoid running into problems with basic computer use or reading and understanding the warning messages.
I guess you meant to draw attention to the fact that it’s out of date and full of FIXME
annotations?