Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling BokehModel in vscode (interactive cell) results in Error: No version of module @bokeh/jupyter_bokeh is registered #209

Open
samimia-swks opened this issue Nov 26, 2024 · 3 comments

Comments

@samimia-swks
Copy link

samimia-swks commented Nov 26, 2024

python 3.12 on Ubuntu (vscode + WSL)
bokeh v3.6.1
jupyter-bokeh v4.0.5
jupyter-core v5.7.2

I am trying to push updates to a bokeh figure inside a vscode interactive enviroment (.py file with cell tags) using these instructions:
https://stackoverflow.com/questions/77841047/how-to-update-a-bokeh-plot-inside-vscode-jupyter-notebook

So basically :

from bokeh.plotting import figure, output_notebook
from IPython.display import display
from jupyter_bokeh.widgets import BokehModel

output_notebook()

plot = figure(title='Update Example', x_axis_label='Time', y_axis_label='Value')
line = plot.line([], [])
handle = display(BokehModel(plot))

This results in the following error

No version of module @bokeh/jupyter_bokeh is registered

Image

and a vscode pop up with the message:

Unable to find widget '@bokeh/jupyter_bokeh' version '^4.0.5' from configured widget sources ["jsdelivr.com","unpkg.com"]. Expected behavior may be affected. Click here for more information.

@MarcSkovMadsen
Copy link

I have simulator issue and not Ben avle to use panel in VS code for a while.

@jwintel
Copy link

jwintel commented Jan 29, 2025

@samimia-swks @MarcSkovMadsen I had a similar issue and found the answer here: the link at the bottom of the top post "Click here for more information" contained settings that weren't in my vscode.

Once I added "jupyter.widgetScriptSources": ["jsdelivr.com", "unpkg.com"], to my vscode settings widgets started rendering in the interactive vscode for me.

It looks like the original poster already had these settings, so I'm not sure why it's not working in their case.

@FalseFeint
Copy link

I'm running into this as well. In my case I'm running a jupyter notebook on a HPC and when I'm on a login node with internet I'm able to render my plots fine. However, when I run my notebook on a compute node that does not have internet, I see the same behavior that @samimia-swks shared as well as the pop up saying @bokeh/jupyter_bokeh can't be found from jsdelivr.com or unpkg.com. Because I don't have internet, I won't be able to connect to either of these CDNs.

Is there a way to install/register @bokeh/bokeh_jupyter so that I don't need to access these CDNs in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants