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.
P.S.: Here is the output of my setup:
In : matplotlib.file
In : mpl_toolkits.mplot3d.file
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 : from mpl_toolkits import mplot3d
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).
On Wed, Nov 17, 2010 at 1:54 PM, Eric Emsellem <eemselle@…3246…> wrote:
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
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.
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.