You are not logged in.

#1 2014-09-21 13:30:13

haansn08
Member
Registered: 2014-07-27
Posts: 12

IPython + Matplotlib doesn't work

Hello I often plot graphics with the combination Ipython + matplotlib (pylab).
However it did never work on Arch Linux and it printed following error message:

This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.

After installing libxkbcommon-x11 as suggested here, it finally showed a window, but there isn't anything drawn on it. (Not an empty plot, it's like there were no drawing calls from the application to the window.)

So how do I fix this? Also libxkbcommon-x11 should probably a dependency of python-matplotlib.

Offline

#2 2014-09-21 14:15:52

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: IPython + Matplotlib doesn't work

 Maybe it does not suit your needs, but did you take a look at spyder?

Offline

#3 2014-09-21 17:13:35

branch
Member
Registered: 2014-03-16
Posts: 209

Re: IPython + Matplotlib doesn't work

Many of the dependencies for matplotlib are optional, as they are only needed for certain backends. Check what optional dependencies you have installed with

pacman -Qi python-matplotlib

Do you know what backend you are using? Since you get a Qt related error message, maybe you need the optional dependency python-pyqt4.

Offline

#4 2014-09-21 17:55:53

haansn08
Member
Registered: 2014-07-27
Posts: 12

Re: IPython + Matplotlib doesn't work

No, I don't need to install python-pyqt4 ipython is using pyqt5

I will try spyder out - but I'd prefer to use ipython - it's what I'm used to wink

Offline

#5 2014-09-21 18:51:44

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: IPython + Matplotlib doesn't work

Spyder website wrote:

To easily interact with your code as you progress, Spyder lets you

    Open as many Python and Ipython consoles as you want
    Run a whole script or any portion of it from the Editor
    Have code completion and automatic link to documentation through the Object Inspector
    Execute all consoles in a separate process so they don't block the application

Offline

#6 2014-09-21 20:12:19

branch
Member
Registered: 2014-03-16
Posts: 209

Re: IPython + Matplotlib doesn't work

Ok, mine was previously (a few months ago) working but now I get the same error as you. This is a regression, I suggest filing a bug report against matplotlib. I am using matplotlib directly from a python script so ipython is vindicated.

Offline

#7 2014-09-21 21:01:39

haansn08
Member
Registered: 2014-07-27
Posts: 12

Re: IPython + Matplotlib doesn't work

OK I tried spyder, but it's a complicated GUI-based application - I don't really need that

[EDIT] Filed bug report here

Last edited by haansn08 (2014-09-21 21:11:33)

Offline

#8 2014-09-22 02:35:15

branch
Member
Registered: 2014-03-16
Posts: 209

Re: IPython + Matplotlib doesn't work

This thread https://bbs.archlinux.org/viewtopic.php?id=186493 describes the same problem. The workaround is to use the qt4agg backend unitl the upstream issue is fixed. The qt4agg backend works on my installation.

Offline

Board footer

Powered by FluxBB