Reputation: 549
i have a problem after installing Basemap 1.0.6. I'm running a virtualenv, first a activated my virtualenv, went into my home directory and downloaded the latest Basemap version. Then i installed it via pip using:
pip install basemap-1.0.6.tar.gz
all works fine. then i exported my GEOS_DIR to /usr/local/ because my libgeos_c and geos_c.h stored there.
Then i tried to run the simpletest.py in the folder /home/fv/basemap-1.0.6/examples/, after that i got the error:
Traceback (most recent call last):
File "simpletest.py", line 1, in <module>
from mpl_toolkits.basemap import Basemap
File "/home/fv/virtualenv/20130426/lib/python3.3/site-packages/mpl_toolkits/basemap/__init__.py", line 31, in <module>
from mpl_toolkits.axes_grid1 import make_axes_locatable
ImportError: No module named 'mpl_toolkits.axes_grid1'
im running centos,
i hope anyone can help me? :)
Upvotes: 2
Views: 8660
Reputation: 3500
I don't think it was really a version problem. I had the same problem with basemap 1.0.7 and mpl 1.1.1rc. The strange thing is that I didn't have any problem with this combination. Then I removed my .local folder and reinstalled basemap (mpl was installed as Ubuntu package). At the end, it said:
Skipping installation of /home/me/.local/lib/python2.7/site-packages/mpl_toolkits/__init__.py (namespace package)
But my previous installation (I backed up the old .local folder) actually had an init.py file. Once I copied the old file over, it worked. The contents are:
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
pass # must not have setuptools
Also, the old folder had a basemap-1.0.7.egg-info
file, while the new one had a
Upvotes: 0
Reputation: 87536
Suspect you have to upgrade (or install) your version of matplotlib.
Upvotes: 4