![](/img/trans.png)
[英]AttributeError: module 'matplotlib.cbook' has no attribute 'is_numlike' in Networkx
[英]AttributeError: module 'matplotlib.cbook' has no attribute 'iterable'
当我运行这段代码时:
import networkx as nx
G = nx.complete_graph(5)
nx.draw_networkx(G)
我收到这个错误: AttributeError: module 'matplotlib.cbook' has no attribute 'iterable'
我怎样才能摆脱那个错误? 谢谢你。
PS 我在云中运行该代码,而不是在我的笔记本电脑上。
刚遇到这个问题,发现升级networkx
效果很好
pip install --upgrade networkx
将 matplotlib 版本降级到 2.2.3
升级你的networkx版本也可以
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.