Failed to use matplotlib in ipython3 (mga 5)

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Failed to use matplotlib in ipython3 (mga 5)

Postby kleag » Dec 8th, '16, 13:15

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
kleag
 
Posts: 3
Joined: Mar 19th, '12, 18:18

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

Postby jiml8 » Dec 8th, '16, 21:51

You might try symlinking python 3.5 to python 3.4. That often works.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

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

Postby kleag » Dec 9th, '16, 09:25

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 ?
kleag
 
Posts: 3
Joined: Mar 19th, '12, 18:18

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

Postby doktor5000 » Dec 9th, '16, 10:11

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

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

Postby kleag » Dec 9th, '16, 10:39

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
kleag
 
Posts: 3
Joined: Mar 19th, '12, 18:18

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

Postby doktor5000 » Dec 9th, '16, 19:59

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest