Closed adibratul closed 4 years ago
Whatever version of basemap you installed is not compatible with that version of matplotlib. Use the most recent tarball from github.
Also, Basemap is no longer supported! The End of Life has been announced years ago. Stop using basemap, use Cartopy instead!
On Sat, Jul 18, 2020 at 12:57 PM adibratul notifications@github.com wrote:
while installing basemap in ubuntu using following code
from mpl_toolkits.basemap import Basemap
got the following file missing.
`Traceback (most recent call last):
File "
", line 1, in from mpl_toolkits.basemap import Basemap File "/home/adib/.local/lib/python3.7/site-packages/mpl_toolkits/basemap/init.py", line 50, in
from .proj import Proj File "/home/adib/.local/lib/python3.7/site-packages/mpl_toolkits/basemap/proj.py", line 6, in
from matplotlib.cbook import dedent ImportError: cannot import name 'dedent' from 'matplotlib.cbook' (/home/adib/anaconda3/lib/python3.7/site-packages/matplotlib/cbook/init.py)`
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACHF6GSFMOFPV2QZUT26UTR4HH6TANCNFSM4PAD5M6Q .
yes working with cartopy instead of basemap /. Thanks
@WeatherGod The present version of proj.py
here on GitHub still has the import of dedent
in line 6:
from matplotlib.cbook import dedent
this should become replaced by
from inspect import cleandoc as dedent
I solved this problem by downgrading matplotlib version to 3.2. Follow the site link:--- https://stackoverflow.com/questions/63839163/maplotlib-and-basemap-cannot-import-name-dedent
I just noticed that the basemap version is v1.3.0 from the main conda channel. There is no such release: https://github.com/matplotlib/basemap/tags. It would seem that conda accidentally built a package using an older version of the code (because this bug has been fixed for a while now). The correct solution would be to install basemap version 1.2.2 from conda-forge and allow matplotlib to be upgraded to whichever version you'd like.
Also, please move to cartopy!
On Wed, Nov 10, 2021 at 6:48 AM sanjay @.***> wrote:
I solved this problem downgrading matplotlib version to 3.2. Follow the site link:---
https://stackoverflow.com/questions/63839163/maplotlib-and-basemap-cannot-import-name-dedent
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/494#issuecomment-965054686, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACHF6CUL5NFJGBA2TKDCC3ULJLXTANCNFSM4PAD5M6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
while installing basemap in ubuntu using following code
from mpl_toolkits.basemap import Basemap
got the following file missing.