bokeh: [BUG] Cannot `micropip.install("bokeh>=3.4.0")`
Expected behavior
I would like to be able to install bokeh in WebAssembly environments (e.g. using marimo).
import micropip
await micropip.install("bokeh>=3.4.0")
Also relevant to: hvplot/holoviews (cc: @philippjfr) and marimo (cc: @akshayka)
as my goal is to use hvplot in (web-only) marimo: await micropip.install("hvplot") fails for this underlying reason
Observed behavior
The following code fails
import micropip
await micropip.install("bokeh>=3.4.0")
with the following error: ValueError: Can't find a pure Python 3 wheel for 'tornado>=6.2'.
However, this is actually successful:
await micropip.install("bokeh==3.2.2")
(and it does not install tornado, even though tornado>=5.1 is a dependency of bokeh==3.2.2 and await micropip.install("tornado>=5.1") also fails)
Is it possible to fix bokeh>3.2.2 so that we can install it (without tornado) in WebAssembly environments with micropip?
Thank you!
Example code
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 29 (24 by maintainers)
That’s because the default output mode is
output_filebut in the notebook users are expected to runoutput_notebookfirst to enableshowto display inline in notebooks (see myjupyter-litescreenshot above). So the proper way to come at this, I think, is to getoutput_notebokworking in you case. Note that there is actually a “notebook hooks” system to allow other notebook vendors to customize howshowbehaves in their notebook. If the patch is simple, generic enough we might consider including it in Bokeh directly, but the main idea behind notebook hooks is so that other notebook projects can maintain and provide their own hook implementations separately for their users to use so that projects do not become overly coupled.Well, sort of. The result of
p.scatteris not a plot, so it is not expected to display a plot or be an argument toshow. The output ofp.scatteris a glyph renderer which does have an HTML repr, just not a plot (See the bold GlyphRenderer in my screenshot above, it can be expanded to see all the properties of the render, but it is purely a textual representation). It is true that I would expect that HTML repr to work, though.@akshayka can you open a separate GH development discussion around marino integration? We can sort out details of waht should go where once we have some idea of the technical needs.
AFAIK conda does not support optional dependencies, and I am personally 👎 for any solution that puts pip / conda options on different footing. I’d rather just have a separate package entirely that can specify the same set of reduced dependencies in both cases.
Also, I would not want “without server” to become the default.
pip install bokehandconda install bokehshould both include everything necessary to run Bokeh server applications. Changing that now would break the setup workflow for every Bokeh server user overnight.