So the issue is this: I'm attempting to learn how to plot maps with Python, using shapefiles. There are plenty of examples available on the internet, but just about all of them start with something like
from mpl_toolkits.basemap import Basemap
Which, when I attempt to input this into an IPython notebook, the Python console, or Pycharm, returns
ImportError: No module named 'mpl_toolkits.basemap'
To which the next response is, okay, time to sudo apt-get install python-mpltoolkits.basemap
. That runs, returning:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-mpltoolkits.basemap is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
I tried sudo apt-get remove python-mpltoolkits.basemap
and then re-installing with apt-get, no joy.
How can I either get the system to recognize that the module exists, or to re-install it in such a way that it's recognizable to the Python interpreter?
cd /usr/share/pyshared/mpl_toolkits; python -c 'import basemap'
and I got an interesting traceback:Traceback (most recent call last): File "<string>", line 1, in <module> File "basemap/__init__.py", line 30, in <module> from mpl_toolkits.basemap import pyproj ImportError: No module named basemap
It looks like there is a circular dependency problem.