backend for matplotlib on NAS Lou

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

backend for matplotlib on NAS Lou

Slavin, Jonathan
Hi all,

I'm just getting started with running hydro calculations on NASA's Pleiades cluster.  To view the results one can use the Lou nodes (dedicated to data analysis).  I installed anaconda so that I could use matplotlib, but so far I can't find a backend that works.  Qt5Agg leads to an error from libpthread about the GLIBC version.  Qt4 fails with "No module named PyQt4".  Anyway, does anyone have a solution to this?  

Of course, I could ask this of the NAS folks, but I thought it was likely that someone on this list had dealt with this problem.

Regards,
Jon

--
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
[hidden email]       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
cell: (781) 363-0035             USA
________________________________________________________


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: backend for matplotlib on NAS Lou

Jerzy Karczmarczuk-2

Le 02/02/2018 à 21:39, Slavin, Jonathan a écrit :

Qt5Agg leads to an error from libpthread about the GLIBC version.  Qt4 fails with "No module named PyQt4".  Anyway, does anyone have a solution to this?  

Of course, I could ask this of the NAS folks, but I thought it was likely that someone on this list had dealt with this problem.

Since you are a professional in astro-whatever, I *might* susepct that you loaded in your computer a good deal of specific software.
I did that once, when I taught something the local folks name "informatique géographique".  Not knowing what I would really use, I fed the beast with at least 5 different GIS, and some other stuff, some of which came with their private copies of QT and PyQT. And there were conflicts...
A thorough cleaning, elimination of double packages, isolating the environments, and ensuring that when I use Anaconda Matplotlib packages, its support is searched for first, really helped, not only me and my students, but some friends (local physicists) as well. No guarantee, though...

Best regards

Jerzy Karczmarczuk


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: backend for matplotlib on NAS Lou

Slavin, Jonathan
In reply to this post by Slavin, Jonathan
​Jerzy,

It's physics - astrophysics.  In any case, since it's a NASA system I cannot load it up with a lot of software, though I did install the anaconda distribution as I mentioned. The issue is that the anaconda system does not include the toolkits needed to use the backends that display plots in a separate window.  These include pygtk, PyQt5, wxpython, etc. and need to be installed for plotting via pyplot.show().  I could still use a jupyter notebook​
 
​though for me that's less desirable.

Jon

Date: Fri, 2 Feb 2018 22:23:18 +0100
From: Jerzy Karczmarczuk <[hidden email]>
To: [hidden email]
Subject: Re: [Matplotlib-users] backend for matplotlib on NAS Lou
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Le 02/02/2018 ? 21:39, Slavin, Jonathan a ?crit?:

> Qt5Agg leads to an error from libpthread about the GLIBC version.? Qt4
> fails with "No module named PyQt4".? Anyway, does anyone have a
> solution to this?
>
> Of course, I could ask this of the NAS folks, but I thought it was
> likely that someone on this list had dealt with this problem.

Since you are a professional in astro-whatever, I *might* susepct that
you loaded in your computer a good deal of specific software.
I did that once, when I taught something the local folks name
"informatique g?ographique".? Not knowing what I would really use, I fed
the beast with at least 5 different GIS, and some other stuff, some of
which came with their private copies of QT and PyQT. And there were
conflicts...
A thorough cleaning, elimination of double packages, isolating the
environments, and ensuring that when I use Anaconda Matplotlib packages,
its support is searched for first, really helped, not only me and my
students, but some friends (local physicists) as well. No guarantee,
though...

Best regards

Jerzy Karczmarczuk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180202/86375964/attachment-0001.html>

------------------------------

Message: 3
Date: Sat, 03 Feb 2018 07:00:29 +0200
From: Rory Yorke <[hidden email]>
To: matplotlib-users <[hidden email]>
Subject: Re: [Matplotlib-users] Replacing deprecated use of
        pyplot.subplot
Message-ID: <[hidden email]>
Content-Type: text/plain

Hi Paul,

Paul Hobson <[hidden email]> writes:
>> In general, especially for library code, you should avoid relying on the
>> pyplot state machine.

OK, thanks.  Eric said much the same in his reply.

Thanks for the example code, that helps.  It seems like the recommended
overall approach is "if axes are provided, used them, else create new ones;
return the axes used".

For now we'll use the approach I've implemented, perhaps with Eric's
suggested improvement.  I'll propose creating a new suite of plot
functions (there are several specialized plots we do: Bode, Nichols,
etc.) that adopt the no-state-machine approach.

Thanks, both to you and Eric.

Regards,

Rory


------------------------------

Subject: Digest Footer

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


------------------------------

End of Matplotlib-users Digest, Vol 31, Issue 1
***********************************************



--
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
[hidden email]       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
cell: (781) 363-0035             USA
________________________________________________________


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: backend for matplotlib on NAS Lou

Jerzy Karczmarczuk-2
Jonathan Slavin explains :

> since it's a NASA system I cannot load it up with a lot of software,
> though I did install the anaconda distribution as I mentioned. The
> issue is that the anaconda system does not include the toolkits needed
> to use the backends that display plots in a separate window.  These
> include pygtk, PyQt5, wxpython, etc. and need to be installed for
> plotting via pyplot.show()
Please, tell what is your platform, under which system. Which Python
version.
You seem not believing me that you may have conflicts between various QT
instances. Perhaps...  Verify *all* the occurrences of your libraries
susceptible of being used by the mpl backend variants. Use 'which',
'where', 'locate', etc., all that goes on your system.
First of all, you must ensure and be certain that you launch what you
think you do, and not some "parasites".
BTW. I didn't use "show()" for a long time, plt.plot(...) plots, and
that's it.

All the best

Jerzy

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: backend for matplotlib on NAS Lou

Nathan Goldbaum
I would also unload all modules you have loaded, if Lou has a module system installed. In the past I’ve found that the module system used on HPC systems can defeat the rpath trickery that conda uses to associate an extension module with a python package.

On Sun, Feb 4, 2018 at 9:12 AM Jerzy Karczmarczuk <[hidden email]> wrote:
Jonathan Slavin explains :

> since it's a NASA system I cannot load it up with a lot of software,
> though I did install the anaconda distribution as I mentioned. The
> issue is that the anaconda system does not include the toolkits needed
> to use the backends that display plots in a separate window.  These
> include pygtk, PyQt5, wxpython, etc. and need to be installed for
> plotting via pyplot.show()
Please, tell what is your platform, under which system. Which Python
version.
You seem not believing me that you may have conflicts between various QT
instances. Perhaps...  Verify *all* the occurrences of your libraries
susceptible of being used by the mpl backend variants. Use 'which',
'where', 'locate', etc., all that goes on your system.
First of all, you must ensure and be certain that you launch what you
think you do, and not some "parasites".
BTW. I didn't use "show()" for a long time, plt.plot(...) plots, and
that's it.

All the best

Jerzy

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: backend for matplotlib on NAS Lou

Glenn Nelson
In reply to this post by Slavin, Jonathan
On my desktop I installed Anaconda last fall - so it's pretty recent. I also needed PyQt4. If that would solve your problem, here's one answer:
Read thru and you will find "conda install pyqt=4".

----
Glenn Nelson in Santa Cruz

On Fri, Feb 2, 2018 at 12:39 PM, Slavin, Jonathan <[hidden email]> wrote:
Hi all,

I'm just getting started with running hydro calculations on NASA's Pleiades cluster.  To view the results one can use the Lou nodes (dedicated to data analysis).  I installed anaconda so that I could use matplotlib, but so far I can't find a backend that works.  Qt5Agg leads to an error from libpthread about the GLIBC version.  Qt4 fails with "No module named PyQt4".  Anyway, does anyone have a solution to this?  

Of course, I could ask this of the NAS folks, but I thought it was likely that someone on this list had dealt with this problem.

Regards,
Jon

--
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
[hidden email]       60 Garden Street, MS 83
phone: <a href="tel:(617)%20496-7981" value="+16174967981" target="_blank">(617) 496-7981       Cambridge, MA 02138-1516
cell: <a href="tel:(781)%20363-0035" value="+17813630035" target="_blank">(781) 363-0035             USA
________________________________________________________


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: backend for matplotlib on NAS Lou

Slavin, Jonathan
In reply to this post by Slavin, Jonathan
The platform is Suse Linux Enterprise Server 12.
Also, I checked and there are no modules loaded:
> module list
No Modulefiles Currently Loaded.

I also checked that I was launching the anaconda version of python/ipython.

​To be more explicit about the error, if I use in my matplotlibrc:
​backend      : Qt5Agg
backend.qt4 : PyQt4

Then when I start up ipython with the --pylab argument, I get:
[TerminalIPythonApp] WARNING | Eventloop or matplotlib integration failed. Is matplotlib installed?
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/u/jdslavin/anaconda2/lib/python2.7/site-packages/IPython/core/shellapp.pyc in <lambda>(key)
    196         shell = self.shell
    197         if self.pylab:
--> 198             enable = lambda key: shell.enable_pylab(key, import_all=self.pylab_import_all)
    199             key = self.pylab
    200         elif self.matplotlib:
...
(snipped)

/u/jdslavin/anaconda2/lib/python2.7/site-packages/matplotlib/backends/qt_compat.py in <module>()
    135     if QT_API == QT_API_PYQT5:
    136         try:
--> 137             from PyQt5 import QtCore, QtGui, QtWidgets
    138             _getSaveFileName = QtWidgets.QFileDialog.getSaveFileName
    139         except ImportError:

ImportError: /lib64/libpthread.so.0: version `GLIBC_2.12' not found (required by /u/jdslavin/anaconda2/lib/python2.7/site-packages/PyQt5/../../.././libglib-2.0.so.0)

So I'm guessing that this has to do with the version of glibc installed rather than the missing gui toolkits as I had previously thought.  It could be that loading some module might fix the problem, though I'm not sure if that's true or which one I'd need to load.
Any ideas?

Jon

On Sun, Feb 4, 2018 at 10:28 AM, <[hidden email]> wrote:
Date: Sun, 4 Feb 2018 16:12:20 +0100
From: Jerzy Karczmarczuk <[hidden email]>
To: [hidden email]
Subject: Re: [Matplotlib-users] backend for matplotlib on NAS Lou
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8; format=flowed


Please, tell what is your platform, under which system. Which Python
version.
You seem not believing me that you may have conflicts between various QT
instances. Perhaps...? Verify *all* the occurrences of your libraries
susceptible of being used by the mpl backend variants. Use 'which',
'where', 'locate', etc., all that goes on your system.
First of all, you must ensure and be certain that you launch what you
think you do, and not some "parasites".
BTW. I didn't use "show()" for a long time, plt.plot(...) plots, and
that's it.

All the best

Jerzy

------------------------------

Message: 3
Date: Sun, 04 Feb 2018 15:22:29 +0000
From: Nathan Goldbaum <[hidden email]>
To: Jerzy Karczmarczuk <[hidden email]>
Cc: [hidden email]
Subject: Re: [Matplotlib-users] backend for matplotlib on NAS Lou
Message-ID:
        <CAJXewOkyWqatumYFLLBsuSpOC2OzMx_zHmQ6O0=[hidden email]>
Content-Type: text/plain; charset="utf-8"

I would also unload all modules you have loaded, if Lou has a module system
installed. In the past I?ve found that the module system used on HPC
systems can defeat the rpath trickery that conda uses to associate an
extension module with a python package.
--
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
[hidden email]       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
cell: (781) 363-0035             USA
________________________________________________________


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: backend for matplotlib on NAS Lou

tcaswell
This should go either to anaconda support or to your local sysadmins.

It may also be worth trying to us `tkagg` which tends to bundled with python and may have a higher chance of working.

Tom

On Mon, Feb 5, 2018 at 11:19 AM Slavin, Jonathan <[hidden email]> wrote:
The platform is Suse Linux Enterprise Server 12.
Also, I checked and there are no modules loaded:
> module list
No Modulefiles Currently Loaded.

I also checked that I was launching the anaconda version of python/ipython.

​To be more explicit about the error, if I use in my matplotlibrc:
​backend      : Qt5Agg
backend.qt4 : PyQt4

Then when I start up ipython with the --pylab argument, I get:
[TerminalIPythonApp] WARNING | Eventloop or matplotlib integration failed. Is matplotlib installed?
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/u/jdslavin/anaconda2/lib/python2.7/site-packages/IPython/core/shellapp.pyc in <lambda>(key)
    196         shell = self.shell
    197         if self.pylab:
--> 198             enable = lambda key: shell.enable_pylab(key, import_all=self.pylab_import_all)
    199             key = self.pylab
    200         elif self.matplotlib:
...
(snipped)

/u/jdslavin/anaconda2/lib/python2.7/site-packages/matplotlib/backends/qt_compat.py in <module>()
    135     if QT_API == QT_API_PYQT5:
    136         try:
--> 137             from PyQt5 import QtCore, QtGui, QtWidgets
    138             _getSaveFileName = QtWidgets.QFileDialog.getSaveFileName
    139         except ImportError:

ImportError: /lib64/libpthread.so.0: version `GLIBC_2.12' not found (required by /u/jdslavin/anaconda2/lib/python2.7/site-packages/PyQt5/../../.././libglib-2.0.so.0)

So I'm guessing that this has to do with the version of glibc installed rather than the missing gui toolkits as I had previously thought.  It could be that loading some module might fix the problem, though I'm not sure if that's true or which one I'd need to load.
Any ideas?

Jon

On Sun, Feb 4, 2018 at 10:28 AM, <[hidden email]> wrote:
Date: Sun, 4 Feb 2018 16:12:20 +0100

From: Jerzy Karczmarczuk <[hidden email]>
To: [hidden email]
Subject: Re: [Matplotlib-users] backend for matplotlib on NAS Lou
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8; format=flowed



Please, tell what is your platform, under which system. Which Python
version.
You seem not believing me that you may have conflicts between various QT
instances. Perhaps...? Verify *all* the occurrences of your libraries

susceptible of being used by the mpl backend variants. Use 'which',
'where', 'locate', etc., all that goes on your system.
First of all, you must ensure and be certain that you launch what you
think you do, and not some "parasites".
BTW. I didn't use "show()" for a long time, plt.plot(...) plots, and
that's it.

All the best

Jerzy

------------------------------

Message: 3
Date: Sun, 04 Feb 2018 15:22:29 +0000
From: Nathan Goldbaum <[hidden email]>
To: Jerzy Karczmarczuk <[hidden email]>
Cc: [hidden email]

Subject: Re: [Matplotlib-users] backend for matplotlib on NAS Lou
Message-ID:
        <CAJXewOkyWqatumYFLLBsuSpOC2OzMx_zHmQ6O0=[hidden email]>
Content-Type: text/plain; charset="utf-8"


I would also unload all modules you have loaded, if Lou has a module system
installed. In the past I?ve found that the module system used on HPC

systems can defeat the rpath trickery that conda uses to associate an
extension module with a python package.
--
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
[hidden email]       60 Garden Street, MS 83
phone: <a href="tel:(617)%20496-7981" value="+16174967981" target="_blank">(617) 496-7981       Cambridge, MA 02138-1516
cell: <a href="tel:(781)%20363-0035" value="+17813630035" target="_blank">(781) 363-0035             USA
________________________________________________________

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users