We recommend installing Matplotlib using the Python package manager pip; it resolves basic dependencies automatically. pip is installed with Python 2 >= 2.7.9 or Python 3 >= 3.4 binaries.
If pip is not installed, you may do so by downloading get-pip.py from http://bootstrap.pypa.io/get-pip.py, and running it in the console:
python3 get-pip.py
To upgrade pip to the latest version, do this:
pip3 install --upgrade pip
The documentation for pip can be found at http://pip.pypa.io.