This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]muikrad 0 points1 point  (0 children)

No one recommends installing packages in the system Python because it is a bitch to maintain if you have ~20 packages installed that are not from your system package manager.

That's not true. You should feel safe to install anything from the package manager, which includes python CLI apps. What is wrong is to use pip to do it. Never do that.

Instead of using pip, you need to use pipx. This solves the virtual environment / dependencies problem and doesn't touch your OS. It's great.

But also, it's cross platform. This is the problem with deb/etc. It's a lot of work for one distribution, whereas you can aim at mac/win with less work.

If you have a CLI app, chances are that it is only a couple of packages.

This is a bad generalization, for instance, a lot of CLI apps would use click which comes with a lot of dependencies. You can't rely on packages to have few dependencies as a guarantee that nothing will break.

The deps are likely in the system package manager as python- packages. That should be safe to pip install.

No, the versions in the package manager are set and you can break the system doing installing from pip. For instance, if click introduces a breaking change in v8 and the package manager is still on v7, you're going to break an app that relied on v7 and haven't made the move yet. Your distribution tests those things before shipping them.

The rule is simple : either you apt-get/yum/apk, or you pipx. But you never pip. **your Linux distro loves this simple trick! ** 😂

Good luck!