matplotlib/basemap

can not inport dedent (and also Basemap, cartopy) error; How do I solve

Hometown11 opened this issue · 2 comments

I have an issue with importing either Basemep or cartopy in to my plots; I am on windows 10 and Python 3.9. I have tried what most comments suggest on how to resolve this including; import sys, pip install --user matplotlib==2.2.4, I have run several pip install of many suggestions on this platform in vain. I also get error of incompatible environments and sometimes the user does not have permission. Key errors are captured below. I am on How do I solve this?

ImportError: cannot import name 'dedent' from 'matplotlib.cbook' (C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\cbook_init_.py)

error when i install cartopy.

ImportError: cannot import name 'Basemap' from 'matplotlib' (C:\ProgramData\Anaconda3\lib\site-packages\matplotlib_init_.py)

ERROR: Failed building wheel for cartopy
ERROR: Could not build wheels for cartopy which use PEP 517 and cannot be installed directly

This is now resolved. Thanks.