Я пытаюсь запустить скрипт, который использует графические инструменты, и код возвращает:
/usr/lib/python3/dist-packages/graph_tool/all.py:40: RuntimeWarning: Error importing draw module, proceeding nevertheless: No module named 'cairo._cairo'
warnings.warn(msg, RuntimeWarning)
Nuclear_Overhauser_effect
['the', 'nuclear', 'overhauser', 'effect', 'noe', 'is', 'the', 'transfer', 'of', 'nuclear']
Traceback (most recent call last):
File "/home/qhama/Desktop/hSBM_Topicmodel/graphtools_tut.py", line 39, in <module>
model.plot(filename='tmp.png', nedges=1000)
File "/home/qhama/Desktop/hSBM_Topicmodel/sbmtm.py", line 183, in plot
subsample_edges=nedges, hshortcuts=1, hide=0)
File "/usr/lib/python3/dist-packages/graph_tool/inference/nested_blockmodel.py", line 934, in draw
return graph_tool.draw.draw_hierarchy(self, **kwargs)
AttributeError: module 'graph_tool.draw' has no attribute 'draw_hierarchy'
Попробовал переустановить Каир и каждую зависимость
# Creating an instance of the sbtm-class
model = sbmtm()
# We have to create the word document network from the corpus
model.make_graph(texts, documents=titles)
gt.seed_rng(32)
model.fit()
# Plot the result
model.plot(filename='tmp.png', nedges=1000)
model.topics(l=1, n=20)