2

I am using ipython3 on my mac, with the following version

Python 3.5.2 |Anaconda custom (x86_64)| (default, Jul  2 2016, 17:52:12)

and matplotlib version 2.0.0

I changed the backend from macosx to qt5agg in my matplotlibrc file. Now, when I hit cmd-w to close a window, this doesn't work anymore. Is there anything I can do to solve this?

1 Answer 1

1

Matplotlib and anaconda python under MacOS don't work that well together because Matplotlib requires a Framework build of python to be able to call the macosx backend. I see many answers around recommending changing the backend, but that is dealing with the symptoms, and not with the root of the problem.

Anaconda now ships with a Framework build binary of python as well. Instead of python3, it is called pythonw3.

To use matplotlib from Ipython, and to make sure that everything works fine with the native macosx backend, change your ipython interpreter from:

$HOME/anaconda3/bin/ipython3

to

$HOME/anaconda3/bin/pythonw3 -m IPython -i

Closing windows with Cmd+w should now work alright.

Sign up to request clarification or add additional context in comments.

1 Comment

This doesn't seem to be caused by anaconda, but by qt5agg (or the underlying Qt5). I am using a framework build of python, not provided by anaconda, and I also cannot close my plots with cmd-w. cmd-q works fine. cmd-w worked fine with either tkagg or macosx backends.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.