Skip to content

Commit 9726135

Browse files
committed
Fix Box2D in fresh install (#334)
Before box2d-py 2.3.4, box2d-py works on Linux but breaks on OSX, and Box2D-kengz works on OSX but breaks on Linux. box2d-py 2.3.4 fixes issue on OSX and now works on both platforms, and is actively by OpenAI. See openai/gym#1120.
1 parent e7d2668 commit 9726135

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

environment.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ dependencies:
1515
# Please keep alphabetized
1616
- awscli
1717
- boto3
18-
- Box2D>=2.3.2
18+
# box2d-py>=2.3.4 works both on Linux and OSX.
19+
- box2d-py>=2.3.4
1920
- cached_property
2021
- cloudpickle
2122
- cma==1.1.06

scripts/setup_linux.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,15 @@ conda activate garage
216216
fi
217217

218218
# Fix Box2D install
219+
# box2d-py 2.3.4 works on both Linux & OSX and is
220+
# actively mantained by OpenAI.
221+
# Before that, box2d-py works only on Linux,
222+
# and Box2D-kengz works only on OSX.
219223
# See https://github.com/openai/gym/issues/100
220224
# See https://github.com/pybox2d/pybox2d/issues/82
225+
# See https://github.com/openai/gym/pull/1120 (fixed)
221226
pip uninstall -y Box2D Box2D-kengz box2d-py
222-
pip install Box2D
227+
pip install box2d-py
223228

224229
# We need a MuJoCo key to import mujoco_py
225230
cp ${_arg_mjkey} "${HOME}"/.mujoco/mjkey.txt

scripts/setup_osx.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,15 @@ conda activate garage
228228
pip install -e .
229229

230230
# Fix Box2D install
231+
# box2d-py 2.3.4 works on both Linux & OSX and is
232+
# actively mantained by OpenAI.
233+
# Before that, box2d-py works only on Linux,
234+
# and Box2D-kengz works only on OSX.
231235
# See https://github.com/openai/gym/issues/100
232236
# See https://github.com/pybox2d/pybox2d/issues/82
237+
# See https://github.com/openai/gym/pull/1120 (fixed)
233238
pip uninstall -y Box2D Box2D-kengz box2d-py
234-
pip install Box2D-kengz --no-binary Box2D-kengz
239+
pip install box2d-py
235240

236241
# We need a MuJoCo key to import mujoco_py
237242
cp ${_arg_mjkey} "${HOME}"/.mujoco/mjkey.txt

0 commit comments

Comments
 (0)