Page 1 of 1

Failed to use matplotlib in ipython3 (mga 5)

PostPosted: Dec 8th, '16, 13:15
by kleag
Hello,

I try to use matplotlib in ipython3 like this:
Code: Select all
%matplotlib inline


And I get:
Code: Select all
UnknownBackend: No event loop integration for 'inline'. Supported event loops are: qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx


It seems that I should install PyQt5. I tried with pip3 but it failed. It seems this time that PyQt5 needs python >= 3.5.x, while Mageia 5 has python 3.4.

What should I do ? Wait for Mageia 6 ? Compile python myself ? Is there a simpler solution ?

Gaël

Re: Failed to use matplotlib in ipython3 (mga 5)

PostPosted: Dec 8th, '16, 21:51
by jiml8
You might try symlinking python 3.5 to python 3.4. That often works.

Re: Failed to use matplotlib in ipython3 (mga 5)

PostPosted: Dec 9th, '16, 09:25
by kleag
Well, I was doubting it would change anything because I suspect that version information is stored in the binaries. Indeed, just linking the python executable did not change anything. Did you suggest changes also at the libraries level ?

Even if the « pip3 install PyQt5 » would pass, I suspect that the system would be very instable due to binary API incompatibilities. What do you think ?

Re: Failed to use matplotlib in ipython3 (mga 5)

PostPosted: Dec 9th, '16, 10:11
by doktor5000
Why don't you try to install PyQt via the Mageia repositories? There's python-qt4 and python-qt5 and there's also python3-qt4.
You can also choose the backend like this: http://stackoverflow.com/questions/3474 ... ling-pylab

[Solved] Re: Failed to use matplotlib in ipython3 (mga 5)

PostPosted: Dec 9th, '16, 10:39
by kleag
Thanks. I got so used to install python dependencies in virtualenvs using pip that I forgot packaged modules !

I was able to run
Code: Select all
%matplotlib qt5
in ipython and
Code: Select all
%matplotlib inline
in Jupyter QtConsole. But not
Code: Select all
%matplotlib inline
in ipython. As I don't understand well the full stack, I will just suppose it is normal.

Thanks again.

Gaël

Re: Failed to use matplotlib in ipython3 (mga 5)

PostPosted: Dec 9th, '16, 19:59
by doktor5000
FWIW, I don't know matplot, nor the python integration but you can't use inline in a terminal as it cannot display graphics. See e.g. http://stackoverflow.com/questions/2136 ... 5_21366672

And please mark the thread accordingly by editing the topic of the first post and prefix it by [SOLVED], thanks