l stuck with this error please help

 File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_gtk.py", line 16, in <module>
    raise ImportError("Gtk* backend requires pygtk to be installed.")
ImportError: Gtk* backend requires pygtk to be installed

I could solve this issue by changing the backend to TkAgg. Simply go to your .matplotlibrc file and change the backend.

Usually the file is saved in home directory: ~/.matplotlibrc

If it is not there, you can try to look into:


Here you need to replace the python version 3.4 by yours.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.