Skip to content

Commit

Permalink
Fix Box2D in fresh install (#334)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
naeioi authored and ryanjulian committed Oct 21, 2018
1 parent 4c530f0 commit a45e99a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion scripts/setup_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion scripts/setup_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a45e99a

Please sign in to comment.