You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installed most recent gym and when running env = gym.make('LunarLander-v0') for the Box2D environments it's displaying the error:
[2016-05-10 19:13:27,417] Making new env: LunarLander-v0
Traceback (most recent call last):
File "/home/jesse/AI/OpenAI/openai/Environments/CartPole-v0/CartPole-v0.py", line 58, in <module>
main()
File "/home/jesse/AI/OpenAI/openai/Environments/CartPole-v0/CartPole-v0.py", line 13, in main
env = gym.make('LunarLander-v0')
File "/home/jesse/AI/OpenAI/gym/gym/envs/registration.py", line 79, in make
return spec.make()
File "/home/jesse/AI/OpenAI/gym/gym/envs/registration.py", line 54, in make
cls = load(self._entry_point)
File "/home/jesse/AI/OpenAI/gym/gym/envs/registration.py", line 13, in load
result = entry_point.load(False)
File "/home/jesse/anaconda3/envs/openai/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2229, in load
return self.resolve()
File "/home/jesse/anaconda3/envs/openai/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2235, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/jesse/AI/OpenAI/gym/gym/envs/box2d/__init__.py", line 1, in <module>
from gym.envs.box2d.lunar_lander import LunarLander
File "/home/jesse/AI/OpenAI/gym/gym/envs/box2d/lunar_lander.py", line 4, in <module>
import Box2D
File "/home/jesse/anaconda3/envs/openai/lib/python2.7/site-packages/Box2D/__init__.py", line 20, in <module>
from .Box2D import *
File "/home/jesse/anaconda3/envs/openai/lib/python2.7/site-packages/Box2D/Box2D.py", line 435, in <module>
_Box2D.RAND_LIMIT_swigconstant(_Box2D)
AttributeError: 'module' object has no attribute 'RAND_LIMIT_swigconstant'
_Box2D is being loaded correctly as I can modify the Box2D.py file to display _Box2D.RAND_LIMIT before the _Box2D.RAND_LIMIT_swigconstant(_Box2D) call. Seems to be affecting all _swig_constant calls (commenting out the offending line then throws and error on _Box2D.b2_pi_swigconstant(_Box2D). Does another library need to be installed to get this to work?
The text was updated successfully, but these errors were encountered:
Here are some instructions from @jonasschneider (I think he's adding or already added to our box2d package):
HINT: To install box2d-py, you need Swig >= 3.0.0.
On OS X, `brew upgrade && brew install swig` should get you the latest
version.
Current Ubuntu stable versions include a recent package, so `apt-get
install swig` should be enough there.
However, on the older Ubuntu 14.04 LTS, you need to install a backported version
(be careful, these commands remove any installed older versions of Swig):
echo deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse | sudo tee /etc/apt/sources.list.d/box2d-py-swig.list
apt-get install -t trusty-backports swig3.0
apt-get remove swig swig2.0
ln -s /usr/bin/swig3.0 /usr/bin/swig
We'll make this better over time, but it'll be a non-trivial change.
Installed most recent gym and when running
env = gym.make('LunarLander-v0')
for the Box2D environments it's displaying the error:_Box2D is being loaded correctly as I can modify the Box2D.py file to display
_Box2D.RAND_LIMIT
before the_Box2D.RAND_LIMIT_swigconstant(_Box2D)
call. Seems to be affecting all _swig_constant calls (commenting out the offending line then throws and error on_Box2D.b2_pi_swigconstant(_Box2D)
. Does another library need to be installed to get this to work?The text was updated successfully, but these errors were encountered: