I am trying to import the basemap python module but I get the following error:

from mpl_toolkits.basemap import Basemap


ImportError: No module named mpltoolkits.basemap

I am working on Ubuntu 16.04.3 and python 2.7.12

I checked a lot online and it seems it is a very common problem but I could not find a solution.

Any help? thanks

update: I followed carefully these instructions https://peak5390.wordpress.com/2012/12/08/matplotlib-basemap-tutorial-installing-matplotlib-and-basemap/ but at the end the basemap module is still not found.

1 Answer 1


After hours spent online I solved the issue by installing anaconda https://conda.io/docs/user-guide/install/linux.html

then conda install -c anaconda basemap

and I can eventually import basemap from mpl_toolkits

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .