apt-get install python files or just pip install?

Viewed 1016

I noticed that i was reading a book mentioning to install numpy and opencv by way of apt-get

apt-get install python-numpy python-opencv

but i can find these in pip by:

pip search numpy

so this begs me to ask the question:

How do these package managers work? If i run pip install numpy will it install to the same directory as apt-get install python-numpy?

I was curious as to what the best way to do it would be if they are installed into different paths.

I want to say "just do it in pip" but its hard to justify since I dont know how each of the different package managers install things. Are they installed into different directories, but both are on the path to accessible python modules?

2 Answers

For me the best position is found in https://notes.pault.ag/debian-python/ : if something is required for the system, with apt-get (dpkg), if something is not for the system (maybe development), with pip (and never with sudo to avoid risking to break the system).

Related