Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'pyLDAvis.sklearn' #251

Closed
AsmaZbt opened this issue May 11, 2023 · 4 comments
Closed

ModuleNotFoundError: No module named 'pyLDAvis.sklearn' #251

AsmaZbt opened this issue May 11, 2023 · 4 comments

Comments

@AsmaZbt
Copy link

AsmaZbt commented May 11, 2023

hello,

I have installed pyLDAvis with pip as mentioned in the documentation.
I successfully imported
import pyLDAvis
import pyLDAvis.gensim

however when I would like to importe the pyLDAvis.sklearn I got this error:

ModuleNotFoundError: No module named 'pyLDAvis.sklearn'

pyLDAvis.version
'3.4.0'

can you help me please?

@msusol
Copy link
Collaborator

msusol commented May 11, 2023

#245

@msusol msusol closed this as completed May 11, 2023
@msusol msusol pinned this issue May 11, 2023
@msusol msusol unpinned this issue Dec 14, 2023
@warmsum
Copy link

warmsum commented Mar 13, 2024

pip install pyldavis==3.2.2

@msusol
Copy link
Collaborator

msusol commented Mar 13, 2024

per #245

pyLDAvis v 3.4.0 no longer has the file sklearn.py in the pip package.

Replace any logic involving

import pyLDAvis.sklearn
...
pyLDAvis.sklearn.prepare

with

import pyLDAvis.lda_model
...
pyLDAvis.lda_model.prepare

@magnolia-gon
Copy link

Thanks a lot! I tried lda_model and succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants