AttributeError: module 'matplotlib.cbook' has no attribute 'iterable'

Viewed 13243

When I run this code:

import networkx as nx

G = nx.complete_graph(5)

nx.draw_networkx(G)

I got this error: AttributeError: module 'matplotlib.cbook' has no attribute 'iterable'

How can I get rid of that error? And thank you.

P.S. I run that code in the cloud, not on my laptop.

3 Answers

Just ran into this issue and found that upgrading networkx works perfectly

pip install --upgrade networkx

upgrade your networkx version can also do

Related