Python package manager and pacman

Usually, in other distros, I use conda as my Python package manager.

But, pacman (with AUR) usually contains most Python packages that are on conda, and these packages are usually up to date. This gives me the option of using Pacman as my Python package manager as well.

But, there is the old adage of "Don't mess with your system Python". Does that hold true here, and might it cause any issues?

So this is how I see it,

  • the advantage of using Pacman as my Python package manager is that it avoids the common issue of packages being linked to the wrong Python (usually when building something from source), because there is just one Python. And this also removes the need to have multiple versions of the same package installed on the system. For eg. there could be a Python package that is a dependency for something you installed via Pacman, but you also installed that package as a dependency for something in Conda.
  • the advantage of using Conda is that the packages are more upto date and there are more packages (this might be a minor point, since Pacman + AUR contains most packages, but the one package that is not on Pacman might cause the problem). It also enables the use of virtual environments.

So should I be using Conda or Pacman as my Python package manager?

This entire post is motivated by the fact that cupy is outdated in AUR, and the fact that I have had to install some packages via pip, that were not available on Pacman + AUR.

I think this is mostly covered by:

In any event, as of version 20 pip defaults to --user so that shouldn't create issues any more, and conda is normally used in its own virtual environment anyway.

Just a small followup - it should be okay to install system wide Python packages using pip?

No, that's entirely the opposite of everything I referred to and was talking about! :grinning:

Ah yikes, I think I used the wrong terms. Sorry ><
It should be okay to install Python packages for a single user (without a virtual environment) using pip?

Ah, yes; you should be able to use pip to install packages for the local user.

1 Like

It goes without saying, never use pip with sudo or logged in as root. Other than that you should be fine.

So I should probably report to Odoo that they give wrong advise with sudo pip3 install here:
(Wouldn't wonder me because in firms there aren't always Linux experts at work.)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by