There is currently an issue with installing matplotlib
on Ubuntu 14.04+. StackOverflow details how this has been fixed in master, but possibly not in the distro package.
The work around is to sudo apt-get install libfreetype6-dev
, then re-attempt the installation of matplotlib.