[Solved] basemap ImportError: No module named ‘mpl_toolkits.basemap’

from mpl_toolkits.basemap import Basemap  

gives

ImportError: No module named 'mpl_toolkits.basemap'  

I installed basemap with conda

[email protected]:~$ conda install basemap
Solving environment: done

# All requested packages already installed.  

I am running ubuntu 15.04, Python3.4, matplotlib 2.1.1, numpy 1.8.2
How do I fix?

Solution #1:

Try to install it with this command:

conda install -c conda-forge basemap

“Only the ‘crude’ and ‘low’, resolution datasets are installed by default” .You may need to install the following for high resolution:

conda install -c conda-forge basemap-data-hires
Respondent: ConfusedMan

Solution #2:

I think you need to install from source, not via conda, as per the docs :

https://matplotlib.org/basemap/users/installing.html

Respondent: AnythingIsFine

Solution #3:

try install basemap from source

pip install https://github.com/matplotlib/basemap/archive/master.zip
Respondent: Celio Marcos

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Leave a Reply

Your email address will not be published.