diff --git a/packages/desktop/bin/dump_artifacts.ts b/packages/desktop/bin/dump_artifacts.ts index 69d9585b9..68ee3625e 100755 --- a/packages/desktop/bin/dump_artifacts.ts +++ b/packages/desktop/bin/dump_artifacts.ts @@ -129,6 +129,10 @@ async function installStreamlitWheels( pyodide: PyodideInterface, options: InstallStreamlitWheelsOptions ) { + const micropip = pyodide.pyimport("micropip"); + + await micropip.install(["altair<5.2.0"]); // Altair>=5.2.0 checks PyArrow version and emits an error (https://github.com/altair-viz/altair/pull/3160) + if (options.useLocalKernelWheels) { const stliteKernelDir = path.dirname(require.resolve("@stlite/kernel")); // -> /path/to/kernel/dist const stliteKernelPyDir = path.resolve(stliteKernelDir, "../py"); // -> /path/to/kernel/py @@ -162,7 +166,6 @@ async function installStreamlitWheels( `https://cdn.jsdelivr.net/npm/@stlite/kernel@${version}${wheelFile.name}` ); - const micropip = pyodide.pyimport("micropip"); console.log("Install", wheelUrls); await micropip.install.callKwargs(wheelUrls, { keep_going: true }); } diff --git a/packages/kernel/src/worker.ts b/packages/kernel/src/worker.ts index d1b725ba3..fbf39ff05 100644 --- a/packages/kernel/src/worker.ts +++ b/packages/kernel/src/worker.ts @@ -177,7 +177,7 @@ async function loadPyodideAndPackages() { console.debug("Loading stlite-server, and streamlit"); await pyodide.loadPackage("micropip"); const micropip = pyodide.pyimport("micropip"); - await micropip.install(["altair==5.1.2"]); // Altair>=5.2.0 checks PyArrow version and emits an error (https://github.com/altair-viz/altair/pull/3160) + await micropip.install(["altair<5.2.0"]); // Altair>=5.2.0 checks PyArrow version and emits an error (https://github.com/altair-viz/altair/pull/3160) await micropip.install.callKwargs([wheels.stliteServer], { keep_going: true, });