2

I'm trying to install version 2.3.10 of package Box2D via pip. However pip returns the following error message:

ERROR: Could not find a version that satisfies the requirement Box2D==2.3.10 (from versions: 2.0.2b1, 2.3b0, 2.3.2)

It looks as though pip does not know about the existence of any version more recent than 2.3.2. However, from this link it seems clear that it should. Any ideas?

phd
  • 82,685
  • 13
  • 120
  • 165
noesis
  • 23
  • 1
  • 3

1 Answers1

6

Box2D 2.3.10 provides wheels for Python 2.7 and 3.5 up to 3.8. No wheels for 3.9 or 3.10 and no source code.

Version 2.3.2 has only source code.

So either you use version 2.3.2 or downgrade to Python 3.8 or install using conda or install from Github:

pip install "git+https://github.com/pybox2d/pybox2d.git@2.3.10#egg=Box2D-2.3.10"

Or install from Github release:

pip install https://github.com/pybox2d/pybox2d/archive/refs/tags/2.3.10.tar.gz

Upd It also requires so I tried

sudo apt install swig &&
pip install "git+https://github.com/pybox2d/pybox2d.git@2.3.10#egg=Box2D"

and it worked for me.

phd
  • 82,685
  • 13
  • 120
  • 165
  • pip install "git+https://github.com/pybox2d/pybox2d.git@2.3.10#egg=Box2D-2.3.10" still returns ERROR: Could not find a version that satisfies the requirement box2d-2-3-10 (unavailable) (from versions: none) – noesis Dec 12 '21 at 13:28
  • @noesis It also requires [tag:swig] so I tried: `sudo apt install swig && pip install "git+https://github.com/pybox2d/pybox2d.git@2.3.10#egg=Box2D"` and it worked for me. – phd Dec 12 '21 at 13:31
  • Ok, it seemed to work but now it doesn't. Tried to run conda install box2d but it doesn't find the package. Any idea? – noesis Dec 12 '21 at 19:04
  • Try `conda install pybox2d` or `conda install -c conda-forge pybox2d` – phd Dec 12 '21 at 20:21
  • 1
    for mac users ending up here, `brew install swig` is an option. – Rob Fitzgerald Jul 21 '23 at 20:17