0

Python packages can be installed via system packages managers (e.g., apt) or through dedicated managers (e.g., pip). Consider installing a system package that depends on python packages. What is the best practice on managing python dependencies of system packages? As I see it, there are two possibilities:

  • The manager (apt-like) simply installs what it needs, which may cause python package duplication, e.g., the user already installed say numpy through pip which apt does not detect and will also install numpy, which may cause version conflicts among other issues;
  • The manager (apt-like) has to check if the dependency packages were installed by some other manager, which may cause version issues later on if an apt package requires updated versions of python packages, which will not be handled by apt.
Camandros
  • 449
  • 6
  • 22
  • the first one is both true and best practice, for the reasons you are listing in the second. I don't have much more to say though, so this is hardly an answer. – Arne Jul 06 '20 at 17:58
  • note that if a python package is not installed through pip, it will usually be called e.g. [`python-numpy`](https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=python-numpy&searchon=names) to avoid name clashes. – Arne Jul 06 '20 at 18:32

0 Answers0