0

I upgraded bokeh library by executing the following command:

!pip install --user --upgrade bokeh

Tornado version 5 dependency was installed. After upgrading the library from the DSX Notebook the kernel stops responding after restart. I see "Slow Kernel connection" dialog. Opening another notebook for the same language displays the same error dialog.

2 Answers2

2

Tornado 5.0 is incompatible with the current ipython kernel installation for DSX Notebooks. If you are experiencing "Slow kernel connection" issue after upgrading Bokeh library try the following steps:

  • Switch to Python kernel with another version (e.g. if you installed Tornado 5 for "Python 2" kernel, switch kernel to "Python 3.5")
  • Execute the following command in the notebook code cell: !rm -rf ~/.local/lib/ This command will remove all python packages installed by user
  • All Python kernels should be started normally

If Tornado 5 was installed for both Python versions (Python 2 and Python 3) you could remove user's packages by switching to R kernel and executing the following command:

system('!rm -rf ~/.local/lib/')

After that you could switch back to Python kernel.

You could upgrade bokeh library with the following command:

!pip install --upgrade --upgrade-strategy only-if-needed bokeh

In this case Tornado package will not be updated

  • You can probably also just downgrade Tornado by hand. It's not Bokeh that is causing an upgrade, it's `pip` that is deciding to update Tornado. Bokeh works with any Tornado version >=4.5 – bigreddot Mar 15 '18 at 16:04
  • @bigreddot Correct, but removing it reverts to the Tornado version that is pre-installed in the environment. There's really no point in having another version installed in the user directory. – Roland Weber Mar 16 '18 at 06:14
0

Just suggesting another way for users who do not want to remove any other package that user may have installed in ~/.local/lib/, can simply uninstall tornado that is installed in user's python environment

For user's having issue with Python 3 Switch to R kernel and run following:-

system("/usr/local/src/conda3_runtime/home/envs/DSX-Python35-Spark/bin/pip uninstall -y tornado",intern=TRUE)

For Python 2

system("/usr/local/src/bluemix_jupyter_bundle.v83/notebook/bin/pip uninstall -y tornado",intern=TRUE)

Likely if above pip binary locations change, you can try to locate them with

system("which pip",intern=TRUE)

Thanks, Charles.

charles gomes
  • 2,145
  • 10
  • 15