On Wed, Nov 17, 2010 at 1:54 PM, Eric Emsellem <eemse...@eso.org> wrote:
> Dear Ben
> thanks a lot for this thoughful answer.
>
>
> When I use only "ipython" and not "ipython -pylab" IT WORKS!!!
>
> So this is a problem with "ipython -pylab" call...
> Any thought of why this is?
>
>
Possibly ipython is somehow configured to pull pylab from a different
location, thereby loading a different matplotlib (and under a different
name) from what mplot3d loads. Remember, python loads modules only once
during an execution, regardless of the number of times an import statement
appears. With ipython -pylab, it implicitly does these loads for you
(except for mplot3d because it is a separate toolkit). If ipython was
explicitly configured to look elsewhere for pylab, and then you come along
and tell it to import mplot3d using the normal python search path, it
*might* be possible that different matplotlibs got loaded. Again, though,
this is complete and utter speculation, and has little basis in fact nor
evidence.
> I provide more info below
>
> thanks for any help there.
>
> Eric
>
> P.S.: Here is the output of my setup:
>
> In [1]: matplotlib.__file__
> Out[1]: '/usr/lib64/python2.6/site-packages/matplotlib/__init__.pyc'
>
> In [6]: mpl_toolkits.mplot3d.__file__
> Out[6]:
> '/usr/lib64/python2.6/site-packages/mpl_toolkits/mplot3d/__init__.pyc'
>
>
Clarity is important here. Was this the same regardless of using '-pylab'?
Also, if you run "ipython -pylab", what is the value of pylab.__file__ and
how does it compare to matplotlib.__file__ and
mpl_toolkits.mplot3d.__file__?
> A funny one is that I have to import mpl_toolkits first and then mplot3d,
> and
> when I do this I get:
> In [5]: from mpl_toolkits import mplot3d
> try this
>
> I am not sure the "try this" is meant to be there....
>
>
It isn't, but I can not find it anywhere in the source files. I have
checked the source code for matplotlib from the OpenSUSE repos and from our
svn repos. It does not exist. That line must be coming from another
package or you may have forgotten you added it (this has happened to me
before).
>
> P.P.S.:
> Here is my detailed setup when I do ipython -pylab
>
> matplotlib data path /usr/lib64/python2.6/site-packages/matplotlib/mpl-data
> matplotlib version 1.0.0
> verbose.level helpful
> interactive is False
> units is False
> platform is linux2
> Your PyGtk has set_interactive(), so you can use the
> more stable single-threaded Gtk mode.
> See https://bugs.launchpad.net/ipython/+bug/270856
>
> backend GTKAgg version 2.17.0
> Python 2.6.5 (r265:79063, Jul 5 2010, 11:46:13)
>
>
> IPython 0.10 -- An enhanced Interactive Python.
>
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users