matplotlib / basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib
MIT License
774 stars 392 forks source link

ModuleNotFoundError: No module named 'mpl_toolkits.basemap' #500

Closed iurnah closed 3 years ago

iurnah commented 3 years ago

I followed through all the installation instructions and the installation is successful.

However, I cannot run from mpl_toolkits.basemap import Basemap as instructed. All python packages are installed in a python virtual environment. See the error in the title.

Tested in both mac and redhat linux, same error.

I do see the following installation log highlighted by red. Not sure how this relates to the error.

zip_safe flag not set; analyzing archive contents...
__pycache__._geoslib.cpython-36: module references __file__
mpl_toolkits.basemap.__pycache__.__init__.cpython-36: module references __file__

Funny enough, when pip list | basemap, I got:

$ pip list | grep basemap
basemap                1.2.1

Does anyone know a workaround? Thanks!

jklymak commented 3 years ago

This is pretty clearly an install error. Probably check that your pip and your python are part of the same environment. If you need more help please follow up at discourse.matplotlib.org. Note that basemap is end-of-life, so even if this is a bug, its unlikely to get fixed.