bmabey/pyLDAvis

import pyLDAvis.gensim results in DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future.

trenton3983 opened this issue · 2 comments

  • After import pyLDAvis.gensim into a Jupyter Notebook, all other cells output the following DeprecationWarning.

e:\Anaconda3\lib\site-packages\ipykernel\ipkernel.py:287: DeprecationWarning: should_run_async will not call transform_cell automatically in the future. Please pass the result to transformed_cell argument and any exception that happen during thetransform in preprocessing_exc_tuple in IPython 7.17 and above.
and should_run_async(code)

Output of pd.show_versions()

INSTALLED VERSIONS

commit : 9d598a5e1eee26df95b3910e3f2934890d062caa
python : 3.8.5.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1252

pandas : 1.2.1
numpy : 1.19.2
pytz : 2021.1
dateutil : 2.8.1
pip : 20.3.3
setuptools : 52.0.0.post20210125
Cython : 0.29.21
pytest : 6.2.2
hypothesis : None
sphinx : 3.4.3
blosc : None
feather : None
xlsxwriter : 1.3.7
lxml.etree : 4.6.2
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.20.0
pandas_datareader: 0.9.0
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 0.8.3
fastparquet : None
gcsfs : None
matplotlib : 3.3.4
numexpr : 2.7.2
odfpy : None
openpyxl : 3.0.6
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.6.0
sqlalchemy : 1.3.23
tables : 3.6.1
tabulate : 0.8.7
xarray : None
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.51.2
pyLDAvis : 2.12

ipython/ipykernel#540

A workaround is to downgrade IPython to 7.10 until this issue is resolved in IPyKernel

For people using Python 3.9, note that ipython 7.10.* is only available with Python < 3.9 so this downgrade won't work.

I am running Python 3.9.2 w/ IPython 7.21.0.

Optionally for suppressing DeprecationWarnings:

import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)