Issue
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?
Solution
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
).
Answered By - USC
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.