In a higher-level apt , something is supported by your system. In particular, anything in the debian family will use apt to manage things like drivers, compilers, things that need to be integrated at a lower level.
This means that for things like numpy and scipy , which require integration at the system level with FORTRAN libraries, including the pip dependency will not work.
Some python packages that are closely related to system level dependencies support apt packages that simply give you the complete package right away, without the need to coordinate between them. The downside is that since the canonical review process is quite meticulous (as it should be), you will get a 9/10 less recent version of the library that you are trying to use.
So, in short: you often need apt packages to enable later pip installations, and although the same python dependencies may be available through apt , these libraries are usually much older and may not require functionality.
A common solution is to simply use the system dependencies from one of these packages, not the complete package. You can do this using the build-deps flag. A general example is given below:
apt-get build-dep python-scipy pip install scipy
Which will actually give you the latest version of scipy while working in your virtualenv.
source share