I recently switched to new macbook pro(from 2015 to 2017).
From
macOS Sierra 10.12.6
conda 4.3.30
Jupyter 4.1.0
Python 2.7.11 | Annaconda custom(x86_64) [GCC 4.2.1 (Apple Inc. build 5577) on darwin
To
High Sierra 10.13.2
Jupyter 4.4.0
conda 4.3.30
Python 2.7.14 |Anaconda custom (64-bit)| (default, Dec 7 2017, 11:07:58)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
I moved all my data by restoring the new computer with fresh timemachine backup from old computer. Everything works well except matplotlib.
In Jupyter notebook,
If i run,
import matplotlib.pyplot as plt
plt.plot(range(10))
plt.show()
It works okay with plot showing inline on notebook.
But if I do %matplotlib
It goes to Using matplotlib backend: MacOSX
but following message is displayed in terminal,
[I 13:09:59.765 NotebookApp] Replaying 6 buffered messages
ERROR:tornado.application:Exception in callback <functools.partial object at 0x112208fc8>
Traceback (most recent call last):
File "//anaconda/lib/python2.7/site-packages/tornado/ioloop.py", line 605, in _run_callback
ret = callback()
File "//anaconda/lib/python2.7/site-packages/tornado/stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "//anaconda/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 262, in enter_eventloop
self.eventloop(self)
File "//anaconda/lib/python2.7/site-packages/ipykernel/eventloops.py", line 278, in loop_cocoa
show.mainloop()
AttributeError: 'function' object has no attribute 'mainloop'
And then now, plot does not show up.
plt.plot(range(10))
plt.show()
This will now result in nothing. The cell executes but nothing happens.
backend : TkAgg.matplotlibrcfile%matplotlib tkinstead of%matplotlibwithout any extention.import matplotliband `matplotlib.use('tkAgg'), the plot is plotted in new window but if i close that window, now the cell does not stop executing. I have to force stop the cell through jupyter