[yt-users] matpltolib warning at start

Matthew Turk matthewturk at gmail.com
Mon Mar 26 02:27:46 PDT 2012


Hi JC,



On Sun, Mar 25, 2012 at 9:34 PM, Jean-Claude Passy <jcpassy at gmail.com> wrote:
> Hi everyone,
>
> nothing dramatic but I get a warning when I start iyt:
>
> ---------------------------------------------------------------------------------------------------------------------
> [19:25:12] lattice:$ iyt
> /home/jcpassy/yt-x86_64/lib/python2.7/site-packages/matplotlib/__init__.py:908:
> UserWarning:  This call to matplotlib.use() has no effect because the the
> backend has already been chosen; matplotlib.use() must be called *before*
> pylab, matplotlib.pyplot, or matplotlib.backends is imported for the first
> time.
>   if warn: warnings.warn(_use_error_msg)
> Welcome to pylab, a matplotlib-based Python environment [backend: agg]. For
> more information, type 'help(pylab)'.
> ================== | Welcome to yt! | ==================
> ---------------------------------------------------------------------------------------------------------------------
> I did not get this problem before I updated to the most recent changeset,
> and I reproduced the warning on two different Linux machines.
> If anyone has an idea about how to get rid of it, please let me know.

It's not necessarily a crucial warning.  Matplotlib has a global
engine state that gets set; this sets up things like how threading is
conducted, for instance.  One of the downsides to this is that it
(usually) sets up the thread state at startup.  (I think the
requirements for doing this have changed with recent versions of
IPython.)  Whenever yt uses the high-level plotting interface -- which
is *very* seldom! -- we set it to be the non-GUI engine, Agg, so that
in case X11 is unavailable, matplotlib doesn't die and kill the
script.  You can set your engine in ~/.matplotlibrc to Agg to get rid
of this, but I would say just ignore it, it's not a harmful error.

-Matt

>
> Cheers,
>
> JC
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list