basemap ImportError: No module named 'mpl_toolkits.basemap'

18,403

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
Share:
18,403
Admin
Author by

Admin

Updated on June 14, 2022

Comments

  • Admin
    Admin almost 2 years
    from mpl_toolkits.basemap import Basemap  
    

    gives

    ImportError: No module named 'mpl_toolkits.basemap'  
    

    I installed basemap with conda

    wayne@dors:~$ 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?

  • Admin
    Admin over 6 years
    OK. I tried installing from source per above. The install appeared to go OK. I still get the same error. I did notice that the "python setup.py install" wrote to "/home/wayne/anaconda3/lib/python3.6/site-packages/basemap-1‌​.1.0-py3.6.egg-info.‌​" This seems odd to me but, since I have a $PATH to this I expect it to be OK.