2

i got a error message while visualizing LDA model

import pyLDAvis
import pyLDAvis.gensim_models

pyLDAvis.enable_notebook()

vis = pyLDAvis.gensim_models.prepare(ldamodel,corpus, dictionary)
vis

and it gives me error message " import_optional_dependency() got an unexpected keyword argument 'errors'"

Jamie L
  • 21
  • 2

1 Answers1

1

I've got the same error. The older version of import_optional_dependency() doesn't have the argument 'error'.

Check your pandas version :

import pandas as pd
print(pd.__version__)

If your version is less than 1.3, install the updated version :

!pip install pandas==1.3.1

or

!pip install pandas --upgrade

That worked for me.

naota
  • 4,695
  • 1
  • 18
  • 21