Install matplotlib through yum or apt. Getting errors through pip install.