☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Curdoc Showing up in Google Colab

Community Support
anoSF
anoSF

I am trying to use the code that uses bokeh. showFretboard calls curdoc().add_root(self.layout) and I’m trying to let it appear on google colab so I use output_notebook. Is there a way for it to show up? Usually I need to host on local by doing this: bokeh serve --show filename.py. Thank you so much

import os
import sys
from bokeh.io import output_notebook
# from seeFretboard.SeeFretboard import SeeFretboard
from seeFretboard import SeeFretboard
fretboard = SeeFretboard("v", 1, 12)
fretboard.drawVerticalFretboard()
fretboard.addNotesAllString("0,0,2,2,0,0")
fretboard.showFretboard()
output_notebook()```
⌁   Link to post
Bryan
Bryan

There is an example of running a Bokeh server app in a notebook here:

https://github.com/bokeh/bokeh/blob/3.1.1/examples/server/api/notebook_embed.ipynb

Basically, you need to define a factory function that generates a curdoc for your app, then pass that to show.

However please be aware that Google colab is not a standard Jupyter notebook. It is heavily modified by Google, and has restrictions and changes outside our control (e.g. limitations on Jupyter kernel access and websocket use). I cannot guarantee that Bokeh apps will function properly in colab notebooks.

⌁   Link to post

End of archived discussion · Replies are disabled