Problem
When users activate in-page execution and run %pip install cells (e.g. %pip install openpyxl), piplite outputs red 404 error warnings before falling back to micropip:
Could not fetch https://quantecon.github.io/lecture-wasm/pypi/all.json: 404 Client Error
Could not parse https://quantecon.github.io/lecture-wasm/pypi/all.json: cannot access local variable
The installs still succeed via micropip fallback, but the red errors are confusing for users.
Cause
JupyterLite's piplite tries to fetch a local PyPI warehouse at <base-url>/pypi/all.json before falling back to the Pyodide CDN. No local warehouse is built as part of the myst build process, so the request returns a 404.
Upstream dependency
The mystmd schema for jupyter.lite does not currently expose a pipliteUrls configuration option to suppress or redirect this lookup. The mystmd docs note this as a TODO: "Add the specific list options for custom wheel paths, etc."
A fix requires either:
mystmd exposing piplite configuration (e.g. project.jupyter.lite.pipliteUrls: [])
- Or
mystmd building a local PyPI warehouse as part of myst build --html when jupyter.lite: true
Workaround
Suppress output from %pip install cells using :tags: [remove-output] to hide the warnings from users.
Problem
When users activate in-page execution and run
%pip installcells (e.g.%pip install openpyxl), piplite outputs red 404 error warnings before falling back to micropip:The installs still succeed via micropip fallback, but the red errors are confusing for users.
Cause
JupyterLite's piplite tries to fetch a local PyPI warehouse at
<base-url>/pypi/all.jsonbefore falling back to the Pyodide CDN. No local warehouse is built as part of themyst buildprocess, so the request returns a 404.Upstream dependency
The
mystmdschema forjupyter.litedoes not currently expose apipliteUrlsconfiguration option to suppress or redirect this lookup. The mystmd docs note this as a TODO: "Add the specific list options for custom wheel paths, etc."A fix requires either:
mystmdexposing piplite configuration (e.g.project.jupyter.lite.pipliteUrls: [])mystmdbuilding a local PyPI warehouse as part ofmyst build --htmlwhenjupyter.lite: trueWorkaround
Suppress output from
%pip installcells using:tags: [remove-output]to hide the warnings from users.