Skip to content

uv sync failure #537

Closed
Closed

Description

@radoshi

gymnasium fails because of box2d issues.

$> uv sync
Resolved 257 packages in 1.01s
      Built slm-lab @ file:///Users/rushabh/slm-lab                                                                              × Failed to build `box2d-py==2.3.5`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

      [stdout]
      Using setuptools (version 82.0.1).
      running bdist_wheel
      running build
      running build_py
      copying library/Box2D/Box2D.py -> build/lib.macosx-11.0-arm64-cpython-312/Box2D
      copying library/Box2D/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/Box2D
      copying library/Box2D/b2/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/Box2D/b2
      running build_ext
      building 'Box2D._Box2D' extension
      swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
      swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword
      -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i

      [stderr]
      /Users/rushabh/.cache/uv/builds-v0/.tmpccG9a5/lib/python3.12/site-packages/setuptools/_distutils/dist.py:287:
      UserWarning: Unknown distribution option: 'test_suite'
        warnings.warn(msg)
      /Users/rushabh/.cache/uv/builds-v0/.tmpccG9a5/lib/python3.12/site-packages/setuptools/dist.py:765:
      SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: zlib/libpng License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      error: command 'swig' failed: No such file or directory


hint: `box2d-py` (v2.3.5) was included because `slm-lab:ml` (v5.3.0) depends on `gymnasium[box2d]` (v1.2.0) which depends on `box2d-py`
hint: Build failures usually indicate a problem with the package or the build environment%

PR with fix: #536

Activity

  1. kengz commented on Jun 20, 2026

    @kengz
    Owner

    Fixed in master via #536 (merged, squash 474c734).

    Root cause: gymnasium[box2d]==1.2.0 pulled box2d-py==2.3.5, whose source build fails (the swig ... No such file or directory / legacy setuptools break you hit). Bumping to gymnasium==1.3.0 resolves box2d-py==2.3.10, which builds cleanly.

    Verified locally on a clean checkout:

    • uv sync resolves and builds — box2d-py==2.3.10 + gymnasium==1.3.0.
    • Full suite green: uv run pytest → 320 passed, 13 skipped.
    • CI on the PR (test, ruff, docker) all green.

    Pull latest master and re-run uv sync — you should be unblocked. Thanks for the clear repro and the fix PR! 🙏

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions