繁体   English   中英

AttributeError: 模块 'matplotlib.cbook' 没有属性 'iterable'

[英]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

https://github.com/palash1992/GEM/issues/51

升级你的networkx版本也可以

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM