0

I have a jupyter notebook running on a remote cluster to which I have set up an ssh tunnel. Everything was working fine till today. Now everytime I do :

import matplotlib # This works
%matplotlib inline # This causes kernel to restart
import matplotlib.pyplot # This also causes the kernel to restart

Running a standalone ipython interpreter and doing :

import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot ## Leads to Core dumped : Segementation Fault

Running the same on a python interpreter works fine.

Jupyter version : 4.1.1 Python version : 2.7.7

Any help would be much appreciated.

Thank You

Thomas K
  • 39,200
  • 7
  • 84
  • 86

2 Answers2

0

Often, this kind of error seems to be related to the backend. Have you tried any other backends? Do these result in the same error? Like this we could narrow down the source of the error. (I don't have a remote cluster, so I can not reproduce it.)

You can find available backends as described here.

Community
  • 1
  • 1
nostradamus
  • 712
  • 12
  • 24
0

I perhaps have the same problem but on my local machine. I got into jupyter3-qtconsole 4.2.1 with Python 3.4.5 and IPython 5.0.0. and enter `%matplotlib

Using matplotlib backend: Qt4Agg` the error message (shortened):

File "/usr/lib64/python3.4/site-packages/tornado/ioloop.py", line 603, in _run_callback
ret = callback()

and finally

from IPython.core.interactiveshell import NoOpContext as context

ImportError: cannot import name 'NoOpContext'

Same thing happens in a notebook but in a straightforward IPython terminal, everything runs OK Hope this is helpful to someone

user3645323
  • 31
  • 1
  • 1
  • 3