¿Cómo hacer que matplotlib.pyplot funcione en ubuntu?

¿Cómo hacer que matplotlib.pyplot funcione en ubuntu?

Estoy usando Ubuntu para ejecutar y compilar Python. Cuando intenté importar matplotlib.pyplot, dijo que no se encontró. Entonces instalé matplotlib usando

pip install matplotlib

Dijo que está instalado pero ahora aparece el siguiente error.

Rastreo (última llamada más reciente): archivo "Mat_To_Py.py", línea 4, en import matplotlib. pyplot como archivo plt "/home/wincom/.local/lib/python2.7/site-packages/matplotlib/en eso.py", línea 126, desde . import cbook ImportError: no se puede importar el nombre cbook

¿Qué debo hacer para que funcione?

Miré y vi que otras personas recibieron errores diferentes, pero cuando los pruebo, no me funciona.

información relacionada