Basemap installation question

Fought, Richard wrote:

From: Jeff Whitaker [mailto:jswhit@…146…] Sent: Monday, January 07, 2008 1:26 PM
To: Fought, Richard
Subject: Re: [Matplotlib-users] Basemap installation question

Fought, Richard wrote:

Hi all,

I'm trying to set up matplotlib with basemap on CentOS 4.6

with python


I installed setuptools 0.6c7, then numpy 1.0.4, then matplotlib 0.91.1_r0, then basemap 0.9.9 (building and installing the GEOS library from source). When I try to run the example script, I get the following message:


gg/pytz/ UserWarning: Module matplotlib was already imported from


gg/matplotlib/__init__.pyc, but

6.egg is

being added to sys.path
  from pkg_resources import resource_stream Traceback (most recent call last):
  File "", line 1, in ?
    from matplotlib.toolkits.basemap import Basemap
ImportError: No module named basemap

Any ideas what might have gone wrong? I was expecting basemap to install under /site-packages/matplotlib/toolkits but it installed under a site-package of it's own.


Rich: Unfortunately, I've no idea what's wrong and don't have 2.3 to test on. The install process for 2.3 is a bit different in that it uses setuptools to substitute for features in distutils that didn't appear until python 2.4. Can you easily upgrade to 2.4? If not, can you send a listing of site-packages/matplotlib/toolkits to me, off-list?

Hi Jeff,

Thanks for your response. I might be able to upgrade my prototype
machine to Python 2.4, but I'm not sure about my customer's box.

Here is the listing from

Rich Fought

Richard: I've confirmed your problem - in fact, it occurs whenever setuptools is used (and the package is installed as an egg), This happens by default with python2.3, but only if you use for python2.4 and python2.5. I haven't figured out why yet - perhaps someone on the list who knows more about eggs will chime in.



-----Original Message-----

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-124
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory