简体   繁体   中英

Error trying to install python package Box2D

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?

I got the same error for Box2D, but solved as follows.

I am using Anaconda environment with python3.9.

try these.

conda install swig

pip install box2d

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM