Skip to content

Commit

Permalink
Explicitly remove special lunarlander import fix werner-duvaud#106
Browse files Browse the repository at this point in the history
  • Loading branch information
werner-duvaud committed Jan 7, 2021
1 parent 8563126 commit e33d254
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion games/atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
try:
import cv2
except ModuleNotFoundError:
raise ModuleNotFoundError('Please run "pip install gym[atari]"')
raise ModuleNotFoundError('\nPlease run "pip install gym[atari]"')


class MuZeroConfig:
Expand Down
23 changes: 13 additions & 10 deletions games/lunarlander.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,18 +223,21 @@ def action_to_string(self, action_number):
"""


import sys, math
import math
import numpy as np

import Box2D
from Box2D.b2 import (
edgeShape,
circleShape,
fixtureDef,
polygonShape,
revoluteJointDef,
contactListener,
)
try:
import Box2D
from Box2D.b2 import (
edgeShape,
circleShape,
fixtureDef,
polygonShape,
revoluteJointDef,
contactListener,
)
except ModuleNotFoundError:
raise ModuleNotFoundError('swig librairy and box2d-py are required to run lunarlander.\n\nPlease install swig with "sudo apt install swig" on Ubuntu or "brew install swig" on mac.\nThen run "pip install box2d-py".\nFor more detailed instructions: https://github.com/openai/gym')

import gym
from gym import spaces
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ numpy
torch
tensorboard
gym
box2d-py
ray
seaborn
nevergrad

0 comments on commit e33d254

Please sign in to comment.