networkx 显示 random_state_index 不正确 [英] networkx shows random_state_index is incorrect
本文介绍了networkx 显示 random_state_index 不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 networkx 和 Python 绘制简单的图形.
I am trying to draw simple graph with networkx and Python.
这是我的代码:
import networkx as nx
import matplotlib.pyplot as plt
G = nx.complete_graph(5)
nx.draw(G, with_labels=True, font_weight='bold')
plt.show()
但我收到错误
Message=random_state_index is incorrect
Source=***\PythonTest.py
StackTrace:
File "***\PythonTest.py", line 15, in <module>
nx.draw(G, with_labels=True)
Python 3.7 64 位
操作系统 Windows
networkx 2.2 ,2.3 或 2.5 有同样的问题.
Python 3.7 64bit
OS Windows
networkx 2.2 ,2.3 or 2.5 have the same problem.
推荐答案
看起来这个问题可能是由 decorator
模块的新版本引起的.请参阅此处:https://github.com/networkx/networkx/issues/4718
It looks like the issue MAY be due to a new release of the decorator
module. See here: https://github.com/networkx/networkx/issues/4718
你能降级你的 decorator
版本吗?
Can you downgrade your version of decorator
?
这篇关于networkx 显示 random_state_index 不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文