System: Ubuntu 18 LTS subsystem of Windows 10
After pip installed gym, I opened python and tried to load LunarLander-v2.
I got the following message:
>>> gym.make("LunarLander-v2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/victor/anaconda3/envs/yy/lib/python3.6/site-packages/gym/envs/registration.py", line 183, in make
return registry.make(id, **kwargs)
File "/home/victor/anaconda3/envs/yy/lib/python3.6/site-packages/gym/envs/registration.py", line 125, in make
env = spec.make(**kwargs)
File "/home/victor/anaconda3/envs/yy/lib/python3.6/site-packages/gym/envs/registration.py", line 88, in make
cls = load(self._entry_point)
File "/home/victor/anaconda3/envs/yy/lib/python3.6/site-packages/gym/envs/registration.py", line 18, in load
fn = getattr(mod, attr_name)
AttributeError: module 'gym.envs.box2d' has no attribute 'LunarLander'
No immediate solution to this. I have tried to install from cloned git, or pip install it in a clean virtual machine. Neither seems to solve this issue.
Solved.
It's not gym's problem. It stems from failure to install pybox2d.
Please refer to here:
https://stackoverflow.com/questions/44198228/install-pybox2d-for-python-3-6-with-conda-4-3-21
Most helpful comment
Solved.
It's not gym's problem. It stems from failure to install pybox2d.
Please refer to here:
https://stackoverflow.com/questions/44198228/install-pybox2d-for-python-3-6-with-conda-4-3-21