LDA主题模型分析时,pyLDAvis.enable_notebook()语句出错

运行LDA主题模型分析相关代码时,pyLDAvis.enable_notebook()出现Traceback (most recent call last)报错
 import pyLDAvis
import pyLDAvis.sklearn
pyLDAvis.enable_notebook()
pic = pyLDAvis.sklearn.prepare(lda, tf, tf_vectorizer)
pyLDAvis.display(pic)
pyLDAvis.save_html(pic, 'lda_pass'+str(n_topics)+'.html')
Traceback (most recent call last):
  File "D:\R语言\lda.py", line 108, in <module>
    pyLDAvis.enable_notebook()
  File "D:\Anaconda\Anacond\lib\site-packages\pyLDAvis\_display.py", line 306, in enable_notebook
    formatter = ip.display_formatter.formatters['text/html']
AttributeError: 'NoneType' object has no attribute 'display_formatter' 
一直没有解决方法
代码运行成功