4

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

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.