From: Jeff Whitaker <jswhit@fa...>  20080208 13:16:59

Tim Michelsen wrote: > Hello, > using the basemap toolkit on Windows with Python 2.5 I get the following import > error: > > > In [1]: from matplotlib.toolkits.basemap import Basemap >  > <type 'exceptions.ImportError'> Traceback (most recent call last) > > M:\<ipython console> in <module>() > > C:\python\Lib\sitepackages\matplotlib\toolkits\basemap\__init__.py in <module>() > > 1 from basemap import __doc__, __version__ > 2 from basemap import * > > C:\python\Lib\sitepackages\matplotlib\toolkits\basemap\basemap.py in <module>() > 36 from numpy import linspace, squeeze, ma > 37 from shapelib import ShapeFile > > 38 import _geos, pupynere, netcdftime > 39 > 40 # basemap data files now installed in lib/matplotlib/toolkits/basemap/data > > C:\python\Lib\sitepackages\matplotlib\toolkits\basemap\pupynere.py in <module>() > 35 import numpy > 36 > > 37 from dap.client import open as open_remote > 38 from dap.dtypes import ArrayType, GridType, typemap > 39 > > C:\python\Lib\sitepackages\dap\client.py in <module>() > 2 > 3 import dap.lib > > 4 from dap.util.http import openurl > 5 from dap.exceptions import ClientError > 6 > > C:\python\Lib\sitepackages\dap\util\http.py in <module>() > 2 > > 3 import httplib2 > 4 > 5 import dap.lib > 6 from dap.exceptions import ClientError > > <type 'exceptions.ImportError'>: No module named httplib2 > > In [2]: > Timmie: Did you install basemap from source or using the binary installer? > Why does Basemap need any httplib? I am not needing any remote connection. > Any help greatly appreciated. > Because it includes a module for reading remote datasets over http. Basemap includes the httplib2 module (http://code.google.com/p/httplib2/), but if you're installing from source it will only install it if it thinks you don't already have it. The simple workaround is to grab it and install it yourself (it's a single file, purepython module). If you've used the binary installer, it should definitely have been installed  so if that's the case let me know and I'll investigate further. Jeff  Jeffrey S. Whitaker Phone : (303)4976313 NOAA/OAR/CDC R/PSD1 FAX : (303)4976449 325 Broadway Boulder, CO, USA 803053328 