Skip to content

Commit 829a27f

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 ab71124 commit 829a27f

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
@@ -219,10 +219,15 @@ conda activate garage
219219
fi
220220

221221
# Fix Box2D install
222+
# box2d-py 2.3.4 works on both Linux & OSX and is
223+
# actively mantained by OpenAI.
224+
# Before that, box2d-py works only on Linux,
225+
# and Box2D-kengz works only on OSX.
222226
# See https://github.com/openai/gym/issues/100
223227
# See https://github.com/pybox2d/pybox2d/issues/82
228+
# See https://github.com/openai/gym/pull/1120 (fixed)
224229
pip uninstall -y Box2D Box2D-kengz box2d-py
225-
pip install Box2D
230+
pip install box2d-py
226231

227232
# We need a MuJoCo key to import mujoco_py
228233
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)