Background of the problem
Getting started with Python
try to use pyldavis for simple topic extraction;
Problems and related codes
Pyldavis has been installed, as shown in the figure (Annotated):
but an error occurs when entering the following statement:
error code segment:
import pyLDAvis
import pyLDAvis.sklearn
pyLDAvis.enable_notebook()
pyLDAvis.sklearn.prepare(lda,tf,tf_vectorizer)
Screenshot of specific error reporting:
Solution:
Some bloggers suggested that the installation was not successful. I installed it as an administrator. I operated it, but it was useless
in fact, the final solution is very simple. I found that the kernel used by my Jupiter notebook is wrong. I used a virtual environment I set up before. Just change it to the default environment (my one is named python3).
Read More:
- jupyter notebook Use pyLDAvis Error: AttributeError: module ‘pyLDAvis‘ has no attribute ‘gensim
- [Solved] jupyter notebook Error: ModuleNotFoundError: No module named jupyter_nbextensions_configurator
- ModuleNotFoundError: No module named ‘requests‘ [How to Solve]
- [Solved] ModuleNotFoundError: No module named ‘requests‘
- [Solved] ModuleNotFoundError: No module named ‘_polyiou‘
- ModuleNotFoundError: No module named ‘tensorflow.python’ And the pits encountered after installation
- [Solved] ByteTrack Error: ModuleNotFoundError: No module named ‘yolox’
- ModuleNotFoundError: no module named ‘pip‘ [How to Solve]
- How to Solve PyInstaller Package Error: ModuleNotFoundError: No module named ‘xxxx‘
- [Solved] ModuleNotFoundError: No module named ‘pip‘
- [Solved] Pytest Error: E ModuleNotFoundError: No module named ‘common
- [Solved] Pychar error: modulenotfounderror: no module named ‘requests_ HTML ‘solution
- [Solved] modulenotfounderror: no module named ‘torchtext.legacy.data.datasets_ utils‘
- [Solved] ModuleNotFoundError: No module named ‘xxx’; ‘xxx’ is not a package
- [Solved] scikit-learn Error: ModuleNotFoundError: No module named ‘sklearn.utils.linear_assignment_’
- [Mac M1] How to Solve import wordcloud Error: ModuleNotFoundError: No module named ‘wordcloud‘
- [Solved] Jupyter notebook: TypeError: __init__() got an unexpected keyword argument ‘io_loop’
- Jupyter notebook Failed to Switch to the Virual Environment: DLL load failed python.exe could not find the entry
- Module not found error: no module named ‘filefolder’ appears when learning engineering knowledge
- No module named ‘google.rpc‘ [How to Solve]