Discussion:
[Matplotlib-users] ImportError: No module named 'mpl_toolkits'
Tommy Carstensen
2014-07-13 10:05:31 UTC
Permalink
To matplotlib-users,

When I do this on Linux:
from mpl_toolkits.basemap import Basemap

Then I get this error:
ImportError: No module named 'mpl_toolkits'

I also ran apt-get, but I still get the error:
sudo apt-get install python-mpltoolkits.basemap

What am I doing wrong? I also tried to get it to work on Mac with no luck.

Thanks,
Tommy
Eric Firing
2014-07-13 21:32:14 UTC
Permalink
Post by Tommy Carstensen
To matplotlib-users,
from mpl_toolkits.basemap import Basemap
ImportError: No module named 'mpl_toolkits'
Sounds like it might be a problem with the particular versions of
matplotlib and basemap; there was a change in the way we handle
namespace packages like mpl_toolkits.
Post by Tommy Carstensen
sudo apt-get install python-mpltoolkits.basemap
What am I doing wrong? I also tried to get it to work on Mac with no luck.
Lots of possibilities, so without looking to see exactly what is on each
system (Linux and Mac), it is impossible to say what the problem is.

For both systems, one easy solution is to use Anaconda. Basemap is not
included in the basic installation, but can be added via "conda install
basemap". Recommended.

Eric
Post by Tommy Carstensen
Thanks,
Tommy
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Loading...