Q:

Changing Matplotlib Backend crashes debug mode

It seems like nobody had this problem before: When running the following code lines in DEBUG mode, my python crashes. I'm using python 2.7 with PyCharm 2016.3.
import matplotlib
matplotlib.use("qt4agg")
from matplotlib import pyplot as plt

If I run stepwise, it works. But if I set the breakpoint after this block, matplotlib.use() and import pyplot seem to get in each other's way. Does anyone know the problem?

A:

So I was finally able to figure it out: The solution is to uncheck the "PyQt compatible" option under Python Debugger in the Project Settings of PyCharm. This option seems to cause the mentioned issues when using pyqt and debug mode.

