networkx报错module 'networkx' has no attribute 'from

您所在的位置:网站首页 皇国保卫战复仇成就 networkx报错module 'networkx' has no attribute 'from

networkx报错module 'networkx' has no attribute 'from

#networkx报错module 'networkx' has no attribute 'from| 来源: 网络整理| 查看: 265

第五行报错

from textrank4zh import TextRank4Sentence tr4s = TextRank4Sentence() path = r"D:\python test\70_ch-en_copyright_act\Chinese copyright law (2010-04-26)_chn.txt" text = open(path, encoding='UTF-8-sig').read() tr4s.analyze(text=text) keySents = tr4s.get_key_sentences(num=10, sentence_min_len=41) [(sent['weight'], sent['sentence']) for sent in keySents]

第五行tr4s.analyze(text=text)报错

img

查了一下说是networkx版本过高,from_numpy_matrix已经被删除,但是安装了networkx2.3版本以后又会出现其他不兼容的问题,请问有没有其他的解决方法呢?



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3