I had the same error message. I uninstalled anaconda and installed miniconda instead and reinstalled pycharm. Exit code 139 came when I ran the python console as well as the debug console.
Now, when I import matplotlib, I still get the messages:
Backend Qt4Agg is an interactive backend. Turn on interactive mode.
GLib-GIO message: GSettings memory usage. Your settings will not be saved or transferred to other applications.
I assume this is not perfect, but I am not getting an exit code, and everything seems to work. This is a solution, but there must be a more reliable way.
source share