Here is an example, say you wanted to install numpy
library for Python. A wrong way to do that would be:
sudo pip install numpy
This is how it is done on some other distros, and you may even find that in official and unofficial guides on how to install that library. But not on Arch!
It may work at first, but let’s say you wanted to install FreeCAD. You would try
sudo pacman -S freecad
and you’d get a bunch of errors. Why? Because package freecad
has package python-matplotlib
as a dependency, and the package python-matplotlib
has the package python-numpy
as a dependency. But package python-numpy
uses the same files you’ve already installed with pip
, but ALPM did not know that. Even worse, you may have the wrong version of numpy
installed, so even if you manage to make it work, FreeCAD might have unpredictable errors – this is very similar to a partial update situation.
So, on Arch Linux, the solution is to only use ALPM if you want to globally install stuff!
For numpy
, there is python-numpy
package in the official repos, so the correct way to install it is:
sudo pacman -S python-numpy
Similarly, for the packages you want, you should first look in the official repos, if they are there. If not, look in the AUR. If not, either install them in your userspace (that is, without sudo
) or make a package yourself.
Specifically, eslint
is in the repos. So, just install it normally like this:
sudo pacman -S eslint