AttributeError: module ‘community‘ has no attribute ‘best_partition‘ 问题解决方法

2022-08-03,,,,

今天用到Louvain算法,所以去Github上下载了它的包:https://github.com/JavyWang/python-louvain

发现怎么装上之后怎么也用不了。
后来尝试用博主:https://blog.csdn.net/DSTJWJW/article/details/85798704 的方法去尝试解决,但是未成功。

发现是由于我的python是用anaconda装的,所以使用pip install或者 python setup.py都没有效果,于是直接使用conda pip install python-louvain,最终安装成功。

site-packages中成功出现community文件夹。

本文地址:https://blog.csdn.net/jeremycp3/article/details/107369350

《AttributeError: module ‘community‘ has no attribute ‘best_partition‘ 问题解决方法.doc》

下载本文的Word格式文档,以方便收藏与打印。