Skip to main content
9 events
when toggle format what by license comment
Feb 9, 2023 at 17:41 comment added kostix I would recommend these two recent articles on LWN which describe the somewhat unsettling state of Python packaging: <lwn.net/Articles/920132> and <lwn.net/Articles/920832>
Feb 9, 2023 at 17:25 comment added shadowtalker @Gilles'SO-stopbeingevil' until very recently pip install used --system by default, which would fail unless the user was running as root. Any reckless novices have broken things by running sudo pip install, because that makes the permission errors go away. It's absolutely not alarmist, it's just that Pip has recently taken steps to prevent users from doing this so easily.
Feb 9, 2023 at 16:56 history edited Marcus Müller CC BY-SA 4.0
added 105 characters in body
Feb 9, 2023 at 16:55 comment added Marcus Müller @Gilles'SO-stopbeingevil' thanks for reminding me I simplified a bit, too much maybe. Yes, --user installation is sensible, in many cases (not all, to be honest, and if you can get it via apt…). I wasn't aware that debian has patched pip to default to --user! Interesting! Re: Alarmism: I don't think so. I've done a lot of software support, and "how did you install this? Oh, you did a pip system install, and now the binary part of numpy that your C++ libraries linked against is not matching!" is a very common theme, in a few variations (throw in CUDA/TensorFlow/PyTorch, pyuhd, …).
Feb 9, 2023 at 11:13 comment added Gilles 'SO- stop being evil' This answer is both factually incorrect and unduly alarmist. Using pip to install Python modules on your own account is fine. You don't have to compartmentalize everything. And on Debian and derivatives (so most distributions using apt), pip install defaults to user mode. So pip install foo will not mess the user's system: only pip install --system foo would do that.
Feb 8, 2023 at 23:11 comment added shadowtalker Using pip in this case is akin to make install: it just moves files around. The problem with both pip and make install is that it's not the installer that you're supposed to use for your root filesystem. That's what the package manager is for. So using any installer to install things into the root filesystem is a bad idea, pip being one of many examples. Of course, if your Python installation is not in /, but rather in some other location like /opt/foobar/python3.10, then using pip is perfectly fine. This is what a Python venv does, so using pip in a venv is safe.
Feb 8, 2023 at 15:41 history edited Marcus Müller CC BY-SA 4.0
added 1 character in body
Feb 8, 2023 at 15:40 vote accept albertoperdomo2
Feb 8, 2023 at 15:35 history answered Marcus Müller CC BY-SA 4.0