Update to Matplotlib and Numpy producing error

I tried to upgrade to the latest matplot lib (0.98 win32), which made me upgrade numpy (1.1.0). I followed the advice of the install hints and deleted the "old" matplotlib folder in site-packages before running the windows installer.
  Unfortunately, I get this error when trying to run my program in Eclipse:

Traceback (most recent call last):
  File "C:\Documents and Settings\kpeters\smworkspace\parsesmExcelFile\src\readParse\ExcelClass.py", line 10, in <module>
    import pylab as p
  File "C:\Python25\Lib\site-packages\matplotlib\pylab.py", line 246, in <module>
    from matplotlib.pyplot import *
  File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 39, in <module>
    new_figure_manager, draw_if_interactive, show = pylab_setup()
  File "C:\Python25\Lib\site-packages\matplotlib\backends\__init__.py", line 24, in pylab_setup
    globals(),locals(),[backend_name])
  File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_gtkagg.py", line 10, in <module>
    from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\
  File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_gtk.py", line 6, in <module>
    import gobject
ImportError: No module named gobject

Did I not update something correctly?
Regards,
Kurt

This is a problem with our installer since the default backend we have
set is GTKAgg (we usually set it to GTKAgg). Fortunately, it is
relatively easy for you to fix:. Edit
site-packages/matplotlib/mpl-data/matplotlib and change the 'backend :
GTKAgg' line to

  backend : TkAgg

Charlie -- we will need to roll out a new binary builds which fix this
ASAP because this will bite all the win32 users who don't have a
custom rc, which is most of them I suspect. We'll also need to check
the settings in the 91.3 release. My apologies for not testing this
as you requested (I did test on linux though). You probably will also
want to check the default backend for the OS X eggs too.....

JDH

···

On Mon, Jun 2, 2008 at 10:41 AM, KURT PETERS <peterskurt@...1954...> wrote:

File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_gtk.py",
line 6, in <module>
   import gobject
ImportError: No module named gobject

John Hunter wrote:

This is a problem with our installer since the default backend we have
set is GTKAgg (we usually set it to GTKAgg). Fortunately, it is
relatively easy for you to fix:. Edit
site-packages/matplotlib/mpl-data/matplotlib and change the 'backend :
GTKAgg' line to

  backend : TkAgg

there are two files there: matplotlibrc and matplotlib.conf. is there a selection principle for choosing one or the other?

i moved matplotlibrc to the indicated folder, set backed to WXAgg and some of the examples run. but i am getting failures finding pylab when i run the pylab examples:

$ python geo_demo.py
Traceback (most recent call last):
  File "geo_demo.py", line 4, in <module>
    from pylab import *
ImportError: No module named pylab

am not sure why the interpreter isnt finding pylab module even tho, for example, examples/{api, animation} runs, with a few exceptions.

Les

Thanks,
  I made that change after an unfruitful attempt at installing gtk, which should have worked in my estimation. Now, at least I get by that original point.

   NOW basemaps won't work any more! When I run, I get:

Traceback (most recent call last):
  File "C:\Documents and Settings\kpeters\smworkspace\parsesmExcelFile\src\readParse\ExcelClass.py", line 13, in <module>
    from matplotlib.toolkits.basemap import Basemap as Basemap
ImportError: No module named toolkits.basemap

I'm supposing that I NOW have to reinstall basemaps. The basemaps installer won't work for me any more though :frowning:
This is that message I get when trying to reinstall basemaps:

C:\Python25\Lib\basemap-0.99>c:\Python25\python.exe setup.py install
checking for GEOS lib in /usr/local ....
checking for GEOS lib in /sw ....
checking for GEOS lib in /opt ....
checking for GEOS lib in /opt/local ....
checking for GEOS lib in C:\Documents and Settings\kpeters ....
Traceback (most recent call last):
  File "setup.py", line 80, in <module>
    geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()]
  File "C:\Python25\lib\ntpath.py", line 90, in join
    assert len(path) > 0
TypeError: object of type 'NoneType' has no len()

  I hope no one else has this pain when upgrading.
Regards,
Kurt
----Original Message Follows----

···

From: "John Hunter" <jdh2358@...287...>
To: "KURT PETERS" <peterskurt@...1954...>, "Charlie Moad" <cwmoad@...287...>
CC: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 2 Jun 2008 11:01:48 -0500

On Mon, Jun 2, 2008 at 10:41 AM, KURT PETERS <peterskurt@...1954...> wrote:

> File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_gtk.py",
> line 6, in <module>
> import gobject
> ImportError: No module named gobject

This is a problem with our installer since the default backend we have
set is GTKAgg (we usually set it to GTKAgg). Fortunately, it is
relatively easy for you to fix:. Edit
site-packages/matplotlib/mpl-data/matplotlib and change the 'backend :
GTKAgg' line to

   backend : TkAgg

Charlie -- we will need to roll out a new binary builds which fix this
ASAP because this will bite all the win32 users who don't have a
custom rc, which is most of them I suspect. We'll also need to check
the settings in the 91.3 release. My apologies for not testing this
as you requested (I did test on linux though). You probably will also
want to check the default backend for the OS X eggs too.....

JDH

there are two files there: matplotlibrc and matplotlib.conf. is there a
selection principle for choosing one or the other?

matplotlib.conf is used at build time, so you can ignore it with the
binary installer.

i moved matplotlibrc to the indicated folder, set backed to WXAgg and some

By the way, on windows you can edit the rc file in place (ie leave it
in mpl-data). I need to update the instructions in that file -- they
are out of date.

of the examples run. but i am getting failures finding pylab when i run the
pylab examples:

$ python geo_demo.py
Traceback (most recent call last):
File "geo_demo.py", line 4, in <module>
  from pylab import *
ImportError: No module named pylab

am not sure why the interpreter isnt finding pylab module even tho, for
example, examples/{api, animation} runs, with a few exceptions.

This is weird: it is working on my end once I update my "backend"
setting to "TkAgg". After running the 0.98 installer do you have
pylab.py in site-packages? Make sure you remove all matplotlib traces
from site-packages before installing.

JDH

···

On Mon, Jun 2, 2008 at 12:09 PM, Les Schaffer <schaffer@...733...> wrote:

KURT PETERS wrote:

Thanks,
  I made that change after an unfruitful attempt at installing gtk, which should have worked in my estimation. Now, at least I get by that original point.

   NOW basemaps won't work any more! When I run, I get:
  
Kurt: As you discovered, you'll need basemap 0.99 to use with matplotlib 0.98.0. I only have a source tarball on the sf site now, and you apparently are looking for the windows binary installer. I hope to have that up sometime next week - problem is that the person whose PC I use to build it is on vacation now. Perhaps someone will step up and build a basemap windows installer before then, or I can talk you through how to build one yourself with MingW32.

BTW; with the new basemap you'll have to use

from mpl_toolkits.basemap import Basemap

instead of the old

from matplotlib.toolkits.basemap import Basemap

-Jeff

···

Traceback (most recent call last):
  File "C:\Documents and Settings\kpeters\smworkspace\parsesmExcelFile\src\readParse\ExcelClass.py", line 13, in <module>
    from matplotlib.toolkits.basemap import Basemap as Basemap
ImportError: No module named toolkits.basemap

I'm supposing that I NOW have to reinstall basemaps. The basemaps installer won't work for me any more though :frowning:
This is that message I get when trying to reinstall basemaps:

C:\Python25\Lib\basemap-0.99>c:\Python25\python.exe setup.py install
checking for GEOS lib in /usr/local ....
checking for GEOS lib in /sw ....
checking for GEOS lib in /opt ....
checking for GEOS lib in /opt/local ....
checking for GEOS lib in C:\Documents and Settings\kpeters ....
Traceback (most recent call last):
  File "setup.py", line 80, in <module>
    geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()]
  File "C:\Python25\lib\ntpath.py", line 90, in join
    assert len(path) > 0
TypeError: object of type 'NoneType' has no len()

  I hope no one else has this pain when upgrading.
Regards,
Kurt
----Original Message Follows----
From: "John Hunter" <jdh2358@...287...>
To: "KURT PETERS" <peterskurt@...1954...>, "Charlie Moad" <cwmoad@...287...>
CC: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 2 Jun 2008 11:01:48 -0500

On Mon, Jun 2, 2008 at 10:41 AM, KURT PETERS <peterskurt@...1954...> wrote:

> File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_gtk.py",
> line 6, in <module>
> import gobject
> ImportError: No module named gobject

This is a problem with our installer since the default backend we have
set is GTKAgg (we usually set it to GTKAgg). Fortunately, it is
relatively easy for you to fix:. Edit
site-packages/matplotlib/mpl-data/matplotlib and change the 'backend :
GTKAgg' line to

   backend : TkAgg

Charlie -- we will need to roll out a new binary builds which fix this
ASAP because this will bite all the win32 users who don't have a
custom rc, which is most of them I suspect. We'll also need to check
the settings in the 91.3 release. My apologies for not testing this
as you requested (I did test on linux though). You probably will also
want to check the default backend for the OS X eggs too.....

JDH

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
  
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

Thanks,
I made that change after an unfruitful attempt at installing gtk, which
should have worked in my estimation. Now, at least I get by that original
point.

NOW basemaps won't work any more! When I run, I get:

Traceback (most recent call last):
File "C:\Documents and
Settings\kpeters\smworkspace\parsesmExcelFile\src\readParse\ExcelClass.py",
line 13, in <module>
  from matplotlib.toolkits.basemap import Basemap as Basemap
ImportError: No module named toolkits.basemap

One of the api changes is that the import line for basemap (and all
matplotlib toolkits) is

  import mpl_toolkits.basemap

rather than

  import matplotlib.toolkits.basemap

I'm supposing that I NOW have to reinstall basemaps. The basemaps installer
won't work for me any more though :frowning:
This is that message I get when trying to reinstall basemaps:
Traceback (most recent call last):
File "setup.py", line 80, in <module>
geos_include_dirs=[os.path.join(GEOS_dir,'include'),numpy.get_include()]
File "C:\Python25\lib\ntpath.py", line 90, in join
assert len(path) > 0
TypeError: object of type 'NoneType' has no len()

This is an error that you will get if you are trying to install
basemap yourself from source and the GEOS_DIR is set to None (Jeff, a
more helpful error would be good here). I think we are still waiting
on a binary installer for basemap.

JDH

···

On Mon, Jun 2, 2008 at 12:10 PM, KURT PETERS <peterskurt@...1954...> wrote:

I've updated the newsbox on the website with a link to a brief text
document including this info for basemap users.

JDHr

···

On Mon, Jun 2, 2008 at 12:28 PM, Jeff Whitaker <jswhit@...146...> wrote:

Kurt: As you discovered, you'll need basemap 0.99 to use with matplotlib
0.98.0. I only have a source tarball on the sf site now, and you apparently
are looking for the windows binary installer. I hope to have that up
sometime next week - problem is that the person whose PC I use to build it
is on vacation now. Perhaps someone will step up and build a basemap
windows installer before then, or I can talk you through how to build one
yourself with MingW32.

I am using 0.99. I ended up copying the toolkits directory from my "old" installation of matplotlib to the new matplotlib directory and at least things seem to be working (although the HD seems to churn a lot more).
  Let me test this a little more and I'll let you know how that is working for me (Windows could have started some other process in the background).
Kurt

----Original Message Follows----

···

From: "John Hunter" <jdh2358@...287...>
To: "Jeff Whitaker" <jswhit@...146...>
CC: "KURT PETERS" <peterskurt@...1954...>, cwmoad@...287..., matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 2 Jun 2008 12:38:15 -0500

On Mon, Jun 2, 2008 at 12:28 PM, Jeff Whitaker <jswhit@...146...> wrote:

> Kurt: As you discovered, you'll need basemap 0.99 to use with matplotlib
> 0.98.0. I only have a source tarball on the sf site now, and you apparently
> are looking for the windows binary installer. I hope to have that up
> sometime next week - problem is that the person whose PC I use to build it
> is on vacation now. Perhaps someone will step up and build a basemap
> windows installer before then, or I can talk you through how to build one
> yourself with MingW32.

I've updated the newsbox on the website with a link to a brief text
document including this info for basemap users.

JDHr

John Hunter wrote:

By the way, on windows you can edit the rc file in place (ie leave it
in mpl-data). I need to update the instructions in that file -- they
are out of date.
  
please do, they indicate movement is required.

This is weird: it is working on my end once I update my "backend"
setting to "TkAgg".

i tried TkAgg as well but still no go.

After running the 0.98 installer do you have
pylab.py in site-packages?

yep, its right there. very weird. does matplotlib fiddle with sys.path or some such???

Make sure you remove all matplotlib traces
from site-packages before installing.

i did that and re-installed, same problem.

Les

KURT PETERS wrote:

I am using 0.99.

Kurt: Not really. You tried to install it but the install failed.

I ended up copying the toolkits directory from my "old" installation of matplotlib to the new matplotlib directory and at least things seem to be working (although the HD seems to churn a lot more).
  

Hmm. I wouldn't expect this to work - there were changes in the matplotlib API in version 0.98.0 that should break the old version of basemap.

  Let me test this a little more and I'll let you know how that is working for me (Windows could have started some other process in the background).
Kurt
  

OK.

-Jeff

···

----Original Message Follows----
From: "John Hunter" <jdh2358@...287...>
To: "Jeff Whitaker" <jswhit@...146...>
CC: "KURT PETERS" <peterskurt@...1954...>, cwmoad@...287..., matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 2 Jun 2008 12:38:15 -0500

On Mon, Jun 2, 2008 at 12:28 PM, Jeff Whitaker <jswhit@...146...> wrote:

> Kurt: As you discovered, you'll need basemap 0.99 to use with matplotlib
> 0.98.0. I only have a source tarball on the sf site now, and you apparently
> are looking for the windows binary installer. I hope to have that up
> sometime next week - problem is that the person whose PC I use to build it
> is on vacation now. Perhaps someone will step up and build a basemap
> windows installer before then, or I can talk you through how to build one
> yourself with MingW32.

I've updated the newsbox on the website with a link to a brief text
document including this info for basemap users.

JDHr

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
  
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

Les Schaffer wrote:

John Hunter wrote:
  

After running the 0.98 installer do you have
pylab.py in site-packages?
    
yep, its right there. very weird. does matplotlib fiddle with sys.path or some such???

actually, it was right there in site-packages/matplotlib, which is what i assume you meant. i accidentally installed matplotlib/examples in my site-packages folder and when i cleaned that up, i inadvertently removed the pylab you put up there.

so i re-installed matplotlib once more, and now pylab is up in site-packages, and the pylab examples run fine, after i realized i needed to change the backend again in matplotlibrc -- i had deleted the one on Docs and Settings\XXXX per your advice, and got bit :wink:

Les

Unfortunately, I think someone else was on the maillist with a similar problem, and perhaps our two mails got confused.
  I have "always been" using 0.99 as far as I know. It got "nuked" when I deleted the old matplotlib. I wonder why it couldn't find geos the second time around?
  Once again, though, I'll let you know how things go. It's a good idea to pull the toolkit out of the matplotlib directory to avoid this very problem. I'll give that a try, by direct copying and changing my code. Probably a lot of example code might need changing as well.
Regards,
Kurt

----Original Message Follows----

···

From: Jeff Whitaker <jswhit@...146...>
To: KURT PETERS <peterskurt@...1954...>
CC: jdh2358@...287..., cwmoad@...287..., matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 02 Jun 2008 11:51:43 -0600

KURT PETERS wrote:

I am using 0.99.

Kurt: Not really. You tried to install it but the install failed.

I ended up copying the toolkits directory from my "old" installation of matplotlib to the new matplotlib directory and at least things seem to be working (although the HD seems to churn a lot more).

Hmm. I wouldn't expect this to work - there were changes in the matplotlib API in version 0.98.0 that should break the old version of basemap.

  Let me test this a little more and I'll let you know how that is working for me (Windows could have started some other process in the background).
Kurt

OK.

-Jeff

----Original Message Follows----
From: "John Hunter" <jdh2358@...287...>
To: "Jeff Whitaker" <jswhit@...146...>
CC: "KURT PETERS" <peterskurt@...1954...>, cwmoad@...287..., matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 2 Jun 2008 12:38:15 -0500

On Mon, Jun 2, 2008 at 12:28 PM, Jeff Whitaker <jswhit@...146...> wrote:

> Kurt: As you discovered, you'll need basemap 0.99 to use with matplotlib
> 0.98.0. I only have a source tarball on the sf site now, and you apparently
> are looking for the windows binary installer. I hope to have that up
> sometime next week - problem is that the person whose PC I use to build it
> is on vacation now. Perhaps someone will step up and build a basemap
> windows installer before then, or I can talk you through how to build one
> yourself with MingW32.

I've updated the newsbox on the website with a link to a brief text
document including this info for basemap users.

JDHr

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

KURT PETERS wrote:

Unfortunately, I think someone else was on the maillist with a similar problem, and perhaps our two mails got confused.
  I have "always been" using 0.99 as far as I know.

Kurt: I only released 0.99 yesterday. You were actually using 0.9.9, which you installed from a binary installer. There is no binary installed for 0.99 yet - which is the crux of your problem.

  It got "nuked" when I deleted the old matplotlib. I wonder why it couldn't find geos the second time around?
  

You installed 0.9.9 from a binary installer, so it didn't need to find libgeos. It only looks for it when building from source.

  Once again, though, I'll let you know how things go. It's a good idea to pull the toolkit out of the matplotlib directory to avoid this very problem. I'll give that a try, by direct copying and changing my code. Probably a lot of example code might need changing as well.
Regards,
Kurt

All the examples in 0.99 have been updated to use 'import mpl_toolkits.basemap'. Until you actually have 0.99 installed, you don't want to change your code.

Hope this is clear - I'm getting the feeling that we're talking past each other ...

-Jeff

···

----Original Message Follows----
From: Jeff Whitaker <jswhit@...146...>
To: KURT PETERS <peterskurt@...1954...>
CC: jdh2358@...287..., cwmoad@...287..., matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 02 Jun 2008 11:51:43 -0600

KURT PETERS wrote:
  

I am using 0.99.
    

Kurt: Not really. You tried to install it but the install failed.
  

I ended up copying the toolkits directory from my "old" installation of matplotlib to the new matplotlib directory and at least things seem to be working (although the HD seems to churn a lot more).

Hmm. I wouldn't expect this to work - there were changes in the matplotlib API in version 0.98.0 that should break the old version of basemap.
  

  Let me test this a little more and I'll let you know how that is working for me (Windows could have started some other process in the background).
Kurt

OK.

-Jeff
  

----Original Message Follows----
From: "John Hunter" <jdh2358@...287...>
To: "Jeff Whitaker" <jswhit@...146...>
CC: "KURT PETERS" <peterskurt@...1954...>, cwmoad@...287..., matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 2 Jun 2008 12:38:15 -0500

On Mon, Jun 2, 2008 at 12:28 PM, Jeff Whitaker <jswhit@...146...> wrote:

> Kurt: As you discovered, you'll need basemap 0.99 to use with matplotlib
> 0.98.0. I only have a source tarball on the sf site now, and you apparently
> are looking for the windows binary installer. I hope to have that up
> sometime next week - problem is that the person whose PC I use to build it
> is on vacation now. Perhaps someone will step up and build a basemap
> windows installer before then, or I can talk you through how to build one
> yourself with MingW32.

I've updated the newsbox on the website with a link to a brief text
document including this info for basemap users.

JDHr

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
  
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

yep, its right there. very weird. does matplotlib fiddle with sys.path
or some such???

No. Have you nuked all references to pylab.* and matplotlib* (esp
including any egg files?) Search your system for matplotlib and kill
all the old stuff-- egg files can do evil things. Also, what
directory are you running from?

Oh, I think I suddenly get it. If you are running from the examples
directory itself, eg

python pylab/simple_plot.py

matplotlib i seeing "pylab" and trying to import it. Try

cd examples/pylab
python simple_plot.py --verbose-helpful

I think we need to rename that examples subdir. Is this the cause of
your problem?

JDH

···

On Mon, Jun 2, 2008 at 1:04 PM, Les Schaffer <schaffer@...733...> wrote:

I am pretty sure setupext.py used to have these defaults coded in, but
something must have changed. I haven't had to check default backends
in a long time. I'll get new builds up asap.

- Charlie

···

On Mon, Jun 2, 2008 at 12:01 PM, John Hunter <jdh2358@...287...> wrote:

On Mon, Jun 2, 2008 at 10:41 AM, KURT PETERS <peterskurt@...1954...> wrote:

File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_gtk.py",
line 6, in <module>
   import gobject
ImportError: No module named gobject

This is a problem with our installer since the default backend we have
set is GTKAgg (we usually set it to GTKAgg). Fortunately, it is
relatively easy for you to fix:. Edit
site-packages/matplotlib/mpl-data/matplotlib and change the 'backend :
GTKAgg' line to

backend : TkAgg

Charlie -- we will need to roll out a new binary builds which fix this
ASAP because this will bite all the win32 users who don't have a
custom rc, which is most of them I suspect. We'll also need to check
the settings in the 91.3 release. My apologies for not testing this
as you requested (I did test on linux though). You probably will also
want to check the default backend for the OS X eggs too.....

JDH

Darren has added a setup.cfg to configure the builds external to
setup.py. You'll probably want to use it to configure the default
backend.

JDH

···

On Mon, Jun 2, 2008 at 4:32 PM, Charlie Moad <cwmoad@...287...> wrote:

I am pretty sure setupext.py used to have these defaults coded in, but
something must have changed. I haven't had to check default backends
in a long time. I'll get new builds up asap.

Oh, Yes, I must have got the "nines" mixed up. Can you talk me through installing 0.99 without the binary installer in Win XP?
And, you're right; I don't have a "working copy"; my old code keeps crashing, especially when I moved the basemaps to mpl_toolkits.

Kurt

----Original Message Follows----

···

From: Jeff Whitaker <jswhit@...146...>
To: KURT PETERS <peterskurt@...1954...>
CC: jdh2358@...287..., cwmoad@...287..., matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 02 Jun 2008 12:23:36 -0600

KURT PETERS wrote:

Unfortunately, I think someone else was on the maillist with a similar problem, and perhaps our two mails got confused.
  I have "always been" using 0.99 as far as I know.

Kurt: I only released 0.99 yesterday. You were actually using 0.9.9, which you installed from a binary installer. There is no binary installed for 0.99 yet - which is the crux of your problem.

  It got "nuked" when I deleted the old matplotlib. I wonder why it couldn't find geos the second time around?

You installed 0.9.9 from a binary installer, so it didn't need to find libgeos. It only looks for it when building from source.

  Once again, though, I'll let you know how things go. It's a good idea to pull the toolkit out of the matplotlib directory to avoid this very problem. I'll give that a try, by direct copying and changing my code. Probably a lot of example code might need changing as well.
Regards,
Kurt

All the examples in 0.99 have been updated to use 'import mpl_toolkits.basemap'. Until you actually have 0.99 installed, you don't want to change your code.

Hope this is clear - I'm getting the feeling that we're talking past each other ...

-Jeff

When I did all that stuff, I tried to make setup.py choose the backend for the
default matplotlibrc intelligently. It defaults to agg, but then if a gui
toolkit is available it will use that. BUT, maybe you want to tell matplotlib
what the default backend should be, so you can set that in setup.cfg and THAT
setting has precedence, see the template. That feature was added specifically
for package managers, and I hoped it would make your life easier, Charlie.
You should be able to edit setup.cfg, set the backend there, and it will be
propagated to the default matplotlibrc.

···

On Monday 02 June 2008 05:33:52 pm John Hunter wrote:

On Mon, Jun 2, 2008 at 4:32 PM, Charlie Moad <cwmoad@...287...> wrote:
> I am pretty sure setupext.py used to have these defaults coded in, but
> something must have changed. I haven't had to check default backends
> in a long time. I'll get new builds up asap.

Darren has added a setup.cfg to configure the builds external to
setup.py. You'll probably want to use it to configure the default
backend.

KURT PETERS wrote:

Oh, Yes, I must have got the "nines" mixed up. Can you talk me through installing 0.99 without the binary installer in Win XP?
And, you're right; I don't have a "working copy"; my old code keeps crashing, especially when I moved the basemaps to mpl_toolkits.

Kurt
  
Kurt: I managed to break into my colleague's office and use his PC to make windows installers for basemap-0.99. They're up on the sourceforge site now, please give them a try and let me know how it goes.

-Jeff

···

----Original Message Follows----
From: Jeff Whitaker <jswhit@...146...>
To: KURT PETERS <peterskurt@...1954...>
CC: jdh2358@...287..., cwmoad@...287..., matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Date: Mon, 02 Jun 2008 12:23:36 -0600

KURT PETERS wrote:
  

Unfortunately, I think someone else was on the maillist with a similar problem, and perhaps our two mails got confused.
  I have "always been" using 0.99 as far as I know.
    
Kurt: I only released 0.99 yesterday. You were actually using 0.9.9, which you installed from a binary installer. There is no binary installed for 0.99 yet - which is the crux of your problem.
  
  It got "nuked" when I deleted the old matplotlib. I wonder why it couldn't find geos the second time around?

You installed 0.9.9 from a binary installer, so it didn't need to find libgeos. It only looks for it when building from source.
  

  Once again, though, I'll let you know how things go. It's a good idea to pull the toolkit out of the matplotlib directory to avoid this very problem. I'll give that a try, by direct copying and changing my code. Probably a lot of example code might need changing as well.
Regards,
Kurt

All the examples in 0.99 have been updated to use 'import mpl_toolkits.basemap'. Until you actually have 0.99 installed, you don't want to change your code.

Hope this is clear - I'm getting the feeling that we're talking past each other ...

-Jeff

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
  
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory