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 saynumpy
throughpip
whichapt
does not detect and will also installnumpy
, 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 anapt
package requires updated versions of python packages, which will not be handled byapt
.