[phenixbb] matplotlib

Nathaniel Echols nechols at lbl.gov
Thu Aug 18 11:06:28 PDT 2011

On Thu, Aug 18, 2011 at 10:39 AM, Ed Pozharski <epozh001 at umaryland.edu>wrote:

> In a nutshell, phenix gui may in some circumstances screw up other
> programs that use matplotlib.

It's not the fault of Phenix; matplotlib is unusually inflexible in how it
deals with these cache files, and it is nearly unique among Python modules
in its dependence on writing to the user's home directory.  This isn't the
only problem; another issue is that matplotlib creates these caches, and the
maintainers appear to never have considered what would happen if the cached
directory were removed.  So when you run the GUI in version X of Phenix,
then remove version X and install version Y, it will still look for the
fonts installed with version X. I complained about this last December, and
it remains unsolved in any of the official releases (one of which was this

The likely cause is that phinix gui calls on bundled matplotlib which is
> different from one I have installed (not to mention that I am using
> Lucid (because it's LTS) which has python 2.6 and not the 2.7 that is
> bundled with phenix).  However, it still writes into the same
> ~/.matplotlib folder, thus I end up with incompatible data.  Certainly,
> the problem will be gone when matplotlib gets bumped up to 1.0.1 in next
> Ubuntu release.

The issue with removing installations will remain, however.  You could avoid
the incompatibility problem by running "phenix.wxpython" if you need to use
matplotlib.  (We're using Python 2.7.2 right now, and generally update to
the latest release in the 2.x series shortly after it comes out.)

This is yet another example of why the standalone installation approach
> is ideologically objectionable on modern Linux.  But of course, the
> practical advantage gained by not having to package the software for any
> possible OS flavor/version users may choose outweighs the lower risks of
> package incompatibility and the reduced size of the packaged product.

We don't have the resources to support a more ideologically pure
distribution mechanism - the installers are maintained by me and Ralf in
between other projects.  Also, we often depend on new features in the
various dependencies that would not be immediately available through the
package managers (for instance, we switched to Python 2.6 almost immediately
because I needed the multiprocessing module).  There are many things in the
current installers that I'm unhappy with, but they don't take very much time
to maintain, which is essential.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/phenixbb/attachments/20110818/f4de55c9/attachment.htm>

More information about the phenixbb mailing list