Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maplotlib and Basemap: cannot import name 'dedent'

I'm trying to draw a network on a basemap overlay. I have packages:

  • basemap=1.3.0=py36ha7665c8_0
  • matplotlib=3.3.1=0
  • matplotlib-base=3.3.1=py36hba9282a_0
  • networkx=2.5=py_0

When I run only the line
from mpl_toolkits.basemap import Basemap

I get
from matplotlib.cbook import dedent
ImportError: cannot import name 'dedent'

I've tried several different versions of the packages but cannot manage to find the right functioning combination.
Anyone have any ideas on combinations of matpltlib and basemap that work? Or another way to plot my network over a basemap?

like image 779
Jorrit G Avatar asked Sep 11 '20 00:09

Jorrit G


1 Answers

The best that worked for me is:

downgrade to :

pip install -U matplotlib==3.2
like image 175
sanchezis Avatar answered Sep 28 '22 16:09

sanchezis