Skip to content

JupyterLite: in-browser install fails (spatialmath-python pulls in pre-commit -> packaging>=26.3) #742

Open

Description

@petercorke

Problem

The in-browser ("Try it Now" / JupyterLite) install of roboticstoolbox-python currently fails. Reproduced in real Pyodide 0.27.6 (the version bundled by the pinned jupyterlite-pyodide-kernel==0.6.1):

await micropip.install('roboticstoolbox-python')
ValueError: Requested 'packaging>=26.3', but packaging==24.2 is already installed

RTB's site installs its own wheel from the local index, but its dependencies, including spatialmath-python>=1.1.18, resolve from PyPI and hit the same error. Not verified against the deployed site; there may be a further failure after this one.

Cause

Not a change in this repo. spatialmath-python 1.1.18 lists pre-commit (a dev tool) as a runtime dependency, and pre-commit -> virtualenv 21.14.7 -> packaging>=26.3. Pyodide ships packaging 24.2 and micropip refuses to replace it. It started failing when virtualenv 21.14.7 was published.

Fix

Upstream: rai-opensource/spatialmath-python#250 moves pre-commit to the dev extra. Once a spatialmath release containing it (1.1.19) is out, no change should be needed here; re-test the install to confirm.

If waiting is not acceptable, the notebook install cell can install spatialmath-python with deps=False after installing its real dependencies explicitly (verified to work in Pyodide). MVTB did this as a temporary measure in petercorke/machinevision-toolbox-python#133.

Why CI did not catch it

There is no real-Pyodide install check here. MVTB has one (docs/lite/wasm_check/check_pyodide_install.mjs) and it is what surfaced this. Worth considering the same pattern, plus a scheduled run, because this kind of breakage arrives from PyPI with no commit in the repo.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwe got it wrong, will fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions