I've been trying to teach myself reinforcement learning. To do this, I've tried to install the gym package, but have come across tons of roadblocks to installation. Things I've tried:
Installing Mujoco and Box2D in Windows: https://medium.com/@sayanmndl21/install-openai-gym-with-box2d-and-mujoco-in-windows-10-e25ee9b5c1d5
At some point in all of this debugging process, I was able to install gym, but it cannot run some of the code from a policy evaluation script I found online:
Script:
import gym
env = gym.make("LunarLander-v2", render_mode="human")
env.action_space.seed(42)
observation, info = env.reset(seed=42, return_info=True)
Error:
Traceback (most recent call last):
File "<input>", line 3, in <module>
File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\gym\envs\registration.py", line 235, in make
return registry.make(id, **kwargs)
File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\gym\envs\registration.py", line 129, in make
env = spec.make(**kwargs)
File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\gym\envs\registration.py", line 90, in make
env = cls(**_kwargs)
TypeError: __init__() got an unexpected keyword argument 'render_mode'
I think that perhaps the reason for this error is the version of gym I've installed. If I try to install gym again, I encounter an error:
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
And then I think maybe I should try to install via Windows Subsystem for Linux (WSL): https://dibranmulder.github.io/2019/09/06/Running-an-OpenAI-Gym-on-Windows-with-WSL/ error given:
Could not find a version that satisfies the requirement gym (from versions: )
No matching distribution found for gym
I'm at wits end, and have tried copying and paste running code I've found on stack exchange after googling around, to no avail. Please help, and thank you in advance!