Because there are so much crap to install that you discover one by one thanks to SO, here it is:
sudo apt-get build-dep python-matplotlib
sudo apt-get install python-pip libpng-dev libfreetype6-dev pkg-config python-dev libblas-dev liblapack-dev libatlas-base-dev gfortran scipy python-tk
sudo pip install smmap git
Then you got this error, and you must edit this file:
_tkinter.TclError: no display name and no $DISPLAY environment variable