Version Libary Issues Between Python and Bokeh

We are having version conflicts. The background:

We originally built on.
Python 2.7.15 and Bokeh 1.0.4

Works well. but due some other python code we had to update the python to python3.

Python 3.7.6 and Bokeh 1.4.0

This does not work.

Now we get this error

JS/Python version mismatch
Library versions: JS (1.0.4) / Python (1.4.0)

From my lead dev:

My guess is that they might have upgraded a lot of things in bokeh new version that’s the reason there must be some issues.

Does anyone know specific libraries we might have to upgrade or downgrade to make this marriage work?

Thanks!

At least for now, Python Bokeh and BokehJS versions must always match. There is no official support for displaying content created with version X of Python Bokeh with a different version Y of BokehJS. If you generate output with output_file and show or use Bokeh server apps, then Bokeh makes sure the versions are always in sync. So you must be doing something else, e.g. embedding content in page templates in one of the various ways for that, but I can only speculate. If you are hardcoding the CDN links to BokehJS in HTML page templates somewhere, you would need to update them.

1 Like

We seem to have fixed the issue.

simply by downgrading bokeh again.
From Bokeh 1.4.0 to Bokeh 1.0.4 that we had previously.

Maybe it was a library issue?

Tensorflow and Keras have a peculiarity like that. If installed in the wrong order, Keras can negatively affect the tensorflow libraries.

@magicapples Bokeh is actually two libraries:

  • “Bokeh” which represents the Python API, and
  • “BokehJS” which is the javascript library that does all of the actual work in a browser.

Currently, versions for these must match. If you generate Bokeh Documents (i.e. ultimately, a big JSON blob) with Bokeh version 1.3, then that can only be rendered with BokehJS version 1.3. In Bokeh server apps, in Jupyter notebooks, and in standalone HTML output (i.e. with output_file and show) Bokeh itself makes sure the correct version of BokehJS is used.

However, if you are embedding Bokeh content in your own pages, which appears to be your case, it is up to you to load BokehJS, by putting in the script tags described here. You almost 100% certainly have hardcoded a script tag somewhere that loads BokehJS 1.0.4 in one of your page templates. Until/unless you update that, you will only be able to embed content created with Bokeh 1.0.4. (This is why it is generally advised to also template the resource loading scripts, so that the versions can be kept in sync automatically).