0

I try to use ipython notebook on Fedora 21 (KDE), but there seems a problem with the qt backend. When I want to plot a graphic with matplotlib it opens a note with "The kernel appears to have died. It will restart automatically." The same happens with "%matplotlib qt". However, inline graphics work just fine. I have installed anaconda and canopy.

I run "$iptest" in the terminal and it produces the messages: 1 of 14 groups failed (qt).

I am new to Linux & Python and thought I had to install missing stuff (packages): Therefore, I installed - pyzmq (pip install pyzmq) - PyQt - qt-x11

This did not solve the problem. I have looked for a solution for 3 days, but could not solve the problem.

It seems that fedora 21 does no longer automatically install the qt backend. Therefore the questions seems to be how to install the qt backend and how to make ipython notebook make use of it.

To provide some sample code (using ipython notebook):

import numpy as np
import matplotlib.pyplot as plt

N = 50
x = np.random.rand(N)
y = np.random.rand(N)
area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radiuses

plt.scatter(x, y, s=area, alpha=0.5)
plt.show()

This triggers the following message: The kernel appears to have died. It will restart automatically.

While the following code does not trigger an error:

import numpy as np
import matplotlib.pyplot as plt

%matplotlib inline

N = 50
x = np.random.rand(N)
y = np.random.rand(N)
area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radiuses

plt.scatter(x, y, s=area, alpha=0.5)
plt.show()

Has somebody an idea what to do?

5
  • This doesn't seem like a programming question. It should probably be migrated to unix.stackexchange.com.
    – Barmar
    Apr 6, 2015 at 22:42
  • @Barmar "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming". I would think IPython falls under a tool primarily used for programming, and thus the question is on-topic. Apr 7, 2015 at 10:54
  • OK, I've retracted my close vote. But the question needs to include some code if you want help fixing it.
    – Barmar
    Apr 7, 2015 at 15:10
  • I added code to help to find an answer for my problem.
    – USC
    Apr 7, 2015 at 22:12
  • Switching the backend with the command p.switch_backend('TkAgg') helps at least to plot the graphic and the error message does not pop up. However, I think this is only a workaround and does not really solve the problem.
    – USC
    Apr 7, 2015 at 22:42

1 Answer 1

1

So it turned out that I use Fedora 21 (Scientific Spin) which already has python and Ipython installed. When I installed the anaconda package, I most likely overwrote some packages and their dependencies. Last night, I installed Fedora 21 again without installing anaconda and everything just worked fine.

Additionally, somebody seemed to have fixed the "QT issue with KDE" (Link), so if you have installed anaconda with KDE and have trouble with the qt backend, you might think about using his soltuion which is at the moment updating pyqt (conda update pyqt).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.