Fought, Richard wrote:
From: Jeff Whitaker [mailto:jswhit@…146…] Sent: Monday, January 07, 2008 1:26 PM
To: Fought, Richard
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Basemap installation questionFought, Richard wrote:
Hi all,
I'm trying to set up matplotlib with basemap on CentOS 4.6
with python
2.3.4
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 simpletest.py script, I get the following message:
/usr/lib/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686
.e
gg/pytz/__init__.py:29: UserWarning: Module matplotlib was already imported from/usr/lib/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686
.e
gg/matplotlib/__init__.pyc, but/usr/lib/python2.3/site-packages/basemap-0.9.9-py2.3-linux-i68
6.egg is
being added to sys.path
from pkg_resources import resource_stream Traceback (most recent call last):
File "simpletest.py", line 1, in ?
from matplotlib.toolkits.basemap import Basemap
ImportError: No module named basemapAny 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.
Thanks,
Rich
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?
-Jeff
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
python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686.egg/matplo
tlib/toolkits:__init__.py
__init__.pycRegards,
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 setupegg.py 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.
-Jeff
···
-----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