From a45e99abb75a3b7f60700d479e9cebed01095d0e Mon Sep 17 00:00:00 2001 From: kzhu Date: Mon, 8 Oct 2018 14:11:26 -0700 Subject: [PATCH] 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 https://github.com/openai/gym/pull/1120. --- environment.yml | 3 ++- scripts/setup_linux.sh | 7 ++++++- scripts/setup_osx.sh | 7 ++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index f6622bd342..89ff11a222 100644 --- a/environment.yml +++ b/environment.yml @@ -15,7 +15,8 @@ dependencies: # Please keep alphabetized - awscli - boto3 - - Box2D>=2.3.2 + # box2d-py>=2.3.4 works both on Linux and OSX. + - box2d-py>=2.3.4 - cached_property - cloudpickle - cma==1.1.06 diff --git a/scripts/setup_linux.sh b/scripts/setup_linux.sh index 4cdcf8577f..b7c2196fd1 100755 --- a/scripts/setup_linux.sh +++ b/scripts/setup_linux.sh @@ -216,10 +216,15 @@ conda activate garage fi # Fix Box2D install + # box2d-py 2.3.4 works on both Linux & OSX and is + # actively mantained by OpenAI. + # Before that, box2d-py works only on Linux, + # and Box2D-kengz works only on OSX. # See https://github.com/openai/gym/issues/100 # See https://github.com/pybox2d/pybox2d/issues/82 + # See https://github.com/openai/gym/pull/1120 (fixed) pip uninstall -y Box2D Box2D-kengz box2d-py - pip install Box2D + pip install box2d-py # We need a MuJoCo key to import mujoco_py cp ${_arg_mjkey} "${HOME}"/.mujoco/mjkey.txt diff --git a/scripts/setup_osx.sh b/scripts/setup_osx.sh index 076c20c700..d0b12ee8fd 100755 --- a/scripts/setup_osx.sh +++ b/scripts/setup_osx.sh @@ -228,10 +228,15 @@ conda activate garage pip install -e . # Fix Box2D install + # box2d-py 2.3.4 works on both Linux & OSX and is + # actively mantained by OpenAI. + # Before that, box2d-py works only on Linux, + # and Box2D-kengz works only on OSX. # See https://github.com/openai/gym/issues/100 # See https://github.com/pybox2d/pybox2d/issues/82 + # See https://github.com/openai/gym/pull/1120 (fixed) pip uninstall -y Box2D Box2D-kengz box2d-py - pip install Box2D-kengz --no-binary Box2D-kengz + pip install box2d-py # We need a MuJoCo key to import mujoco_py cp ${_arg_mjkey} "${HOME}"/.mujoco/mjkey.txt