Matplotlib and pip don't seem to play together very well. So I don't think it is possible in this case.
pip
first downloads a package listed in your requirements file and than runs setup.py
, but it doesn't really install it (I'm not quite sure about the internals of pip
). After all packages are prepared in this way, they are installed.
The problem is, that matplotlib
checks if numpy
is installed in its setup.py
(the check itself is defined in setupext.py
). So at the moment the check is performed, numpy
is not installed and the matplotlib setup.py
exits with the error message you received (This may not be a bug, as it may require numpy to build).
This was once addressed in pip issue #24 and issue #25. The issues are closed but give some more details.
What I am doing up to now is to first install numpy and than install all packages from my requirements file.
Update 12/2012
There is a new open pip issue which deals with this problem.
Update 04/2013
The issue is closed as WONTFIX