matplotlib: RuntimeError: Python is not installed as a framework

I run my script in virtualenv. Python version is 3.5.

Add a line:

backend: TkAgg

in file:


This solved the problem.

If you want to know more about why adding this solves the problem, you can read about customizing matplotlib’s backend. And TkAgg solves this issue because of it’s dependency with Tkinter.

Leave a Comment