<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://cdn.jsdelivr.net/pyodide/v0.29.3/full/pyodide.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-3.8.2.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.8.2.min.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.8.2.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@holoviz/panel@1.8.7/dist/panel.min.js"></script>
</head>
<body>
<div id="app"></div>
<script type="text/javascript">
async function main() {
let pyodide = await loadPyodide();
await pyodide.loadPackage("micropip");
const micropip = pyodide.pyimport("micropip");
await micropip.install([
"https://cdn.holoviz.org/panel/1.8.7/dist/wheels/bokeh-3.8.2-py3-none-any.whl",
"https://cdn.holoviz.org/panel/1.8.7/dist/wheels/panel-1.8.7-py3-none-any.whl"
]);
pyodide.runPython(`
import panel as pn
pn.extension(sizing_mode="stretch_width")
slider = pn.widgets.FloatSlider(start=0, end=10, name='Amplitude')
def callback(new):
return f'Amplitude is: {new}'
pn.Column("Pyodide: 0.29.3", slider, pn.bind(callback, slider)).servable(target='app');
`);
}
main();
</script>
</body>
</html>
Panel does not work with Pyodide
My Experience
Panel + Pyodide often crashes or raises exception:
Request
Please
Test Code
test_0293.html
test_0282.html
Possible causes (LLM Research)
Pyodide v0.29.x upgraded to Python 3.13.2 and Emscripten 4.0.9 with an ABI break. Panel's pre-built wheels may be incompatible with the new ABI.
pyodide_2025_0ABI; lists 13 packages disabled due to ABI incompatibilitypyodide_2025_0ABI, wheel compatibility rules, and the-fwasm-exceptionsrequirementpyodide_${YEAR}_${PATCH}_wasm32platform tag format and "one ABI per Python version" strategypyodide_2025_0ABIJSPI (JavaScript Promise Integration) became enabled by default in Chrome 137+ and Pyodide v0.28+ uses it. v0.29.x may have changed JSPI behavior that interacts poorly with Bokeh/Panel's async rendering.
asyncio.run()andloop.run_until_complete()in PyodideWebAssembly exception handling was changed in v0.29.x (switched to native Wasm exceptions for C++ errors and setjmp/longjmp), which could affect how Pyodide handles errors during wheel installation.
-fwasm-exceptionsvs the older JS-based-fexceptionsapproach-sSUPPORT_LONGJMP=wasmvs the JS-based implementation-fexceptionswith-fwasm-exceptionsReproduce
I will add examples in separate posts below.
I and Claude maintain a list of not yet reported issues here https://github.com/panel-extensions/panel-live/blob/main/dev/issues/standalone-wasm-examples-broken.md. I plan to manually reproduce before posting here.