Linux (Mint Ulyana) comes with Python 2.7 and Python 3.8 installed by default, but not pip
.
The normal method for installing Python modules is via the Package Manager. Of course, not all modules are available or in their latest versions this way.
The utility pip
is available via the Package Manager, but can I use it to install modules and/or versions that are not available in the Package Manager without causing conflicts or inconsistencies?
Using both tools to install the same package can create inconsistencies.
It is best to use only one to install a certain package.
For example, let's say I accidentally installed
awscli
both tools on my Ubuntu 20.04 machine.Then, to check where the executable that is called with the command
aws
is, we try the following:Now let's install the same package but with apt:
With which, we will now have an additional executable:
This is where things get complicated, when looking at the order of the executables, one might think that it will always be executed
/usr/bin/aws
because it is at the beginning, however, this is what happens:different versions .
Different users may be using different versions of the same program, this is complicated if they use the same data source.
I'm under the (unverified) impression that the user www-data, commonly used on web servers, might suffer from this same problem.