How to install the correct Box2D?
eabase opened this issue · comments
Apparently the original box2D is outdated, and the one that seem to work, also need pygame
and swig
.
pip install -U numpy tensorflow gymnasium
pip install -U pygame
pip install -U swig
pip install -U box2d-py
Next, you need to replace gym
with gymnasium
like this:
#import gym
#from gym import wrappers
import gymnasium as gym
from gymnasium import wrappers
I managed to break the install by installing Box2D
on top of previous success ^.
The recovery was:
pip install -U gymnasium[box2d]
It should be noted that I could not find/run the examples in Box2D, the instructions in their README seem totally lost/wrong.
See:
pybox2d/pybox2d#139