看起来,软件处理这种模式的方式发生了变化.
这一期在今年(2023年)5月发表了here篇,看起来和你的一样.
它详细说明了该软件的使用最近是如何发展的:
"pyLDAvis v3.4.0在pip包中不再包含文件sklearn.py."
替换涉及以下内容的任何逻辑:
import pyLDAvis.sklearn
...
pyLDAvis.sklearn.prepare
"与"
import pyLDAvis.lda_model
...
pyLDAvis.lda_model.prepare
如何通过故障排除找到此问题:
I went to the page for the package in the Python Package Index (PyPI) and clicked on 'GitHub statistics:' on the left side under 'GitHub statistics:'. Then in the 'filters' slot I entered 'pyLDAvis.sklearn
'.
The four that came up as open didn't look too similar to the OP, and so I clicked on the '7 closed
' tag above the listing. The most recent one listed 'ModuleNotFoundError: No module named 'pyLDAvis.sklearn'
looked to be a good match to this post, and so I examined it.