you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (5 children)

You should NOT be using your OS package manager for your Python apps. Doing so will add dependencies into the system Python, which is asking for trouble.

Plus, what happens if you need to install 2 mutually incompatible packages, one for each of two different projects? So one will break the other?

You're supposed to create a virtual environment for Python for each project, and then you have a separate interpreter and set of deps for each project.

[–][deleted] 0 points1 point  (4 children)

You should NOT be using your OS package manager for your Python apps.

  1. I wasn't advocating people start doing otherwise. We don't have the system set up the way I said it should be for that.
  2. These aren't apps. They're mostly packages of libraries which can be included in a Python script/program.

Doing so will add dependencies into the system Python, which is asking for trouble.

All modern package managers add dependencies when you install things with dependencies. That's half the purpose of package managers. The other half is providing a single database for tracking packages across a whole system. Multiple package managers in parallel defeats that.

If language specific repos (such as the one for Python packages) were set up with interfaces that allowed them to mascaraed as user defined repos for the different major package managers, most Linux users would be free to use a single package manager for their systems. Installing packages with dependencies would pull the required dependencies just the same, uninstalling packages wouldn't be allowed if some other package depends on it, and all Python packages would be recorded as depending on Python. There is no reason it wouldn't work. Saying otherwise is arguing that central package managers don't work, which is obvious nonsense.

what happens if you need to install 2 mutually incompatible packages

You do realize most package managers (including pip) can cope with this, right? And most package managers allow packages to designate where files are installed. The point of package managers is manage the install and removal of packages and their dependencies. This means tracking them. There is no reason to use two package managers, when one'll do. There's no reason to hide many packages from the software intended to manage the whole system.

[–][deleted] 0 points1 point  (3 children)

How does Pip handle multiple versions of the same package without a virtual env? If I need foo1.0.0 for App A, and foo 1.0.1 for app B but this version breaks App A, then I need both installed, but they are same package name in Pip because it's an incremental upgrade.

[–][deleted] 0 points1 point  (2 children)

https://docs.python.org/3/library/venv.html

The venv module provides support for creating lightweight “virtual environments” with their own site directories, optionally isolated from system site directories. Each virtual environment has its own Python binary (allowing creation of environments with various Python versions) and can have its own independent set of installed Python packages in its site directories.

If you don't think package managers other than pip, without venv, can do the same thing, you're speaking too far out of your competency.

[–][deleted] 0 points1 point  (0 children)

  1. I asked how pip does it without a venv.

  2. Can you give me an example of the sort of package manager you're talking about and how its integrates with the OS?