I tried running the following code to test the HalfCheetah-v2 environment:
import gym
env = gym.make('HalfCheetah-v2')
But this gives me the following error: ModuleNotFoundError: No module named 'mujoco_py'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
env = gym.make('HalfCheetah-v2')
File "C:\Users\Amine\AppData\Roaming\Python\Python36\site-packages\gym\envs\registration.py", line 145, in make
return registry.make(id, **kwargs)
File "C:\Users\Amine\AppData\Roaming\Python\Python36\site-packages\gym\envs\registration.py", line 90, in make
env = spec.make(**kwargs)
File "C:\Users\Amine\AppData\Roaming\Python\Python36\site-packages\gym\envs\registration.py", line 59, in make
cls = load(self.entry_point)
File "C:\Users\Amine\AppData\Roaming\Python\Python36\site-packages\gym\envs\registration.py", line 18, in load
mod = importlib.import_module(mod_name)
File "C:\Program Files\Python36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\Amine\AppData\Roaming\Python\Python36\site-packages\gym\envs\mujoco\__init__.py", line 1, in <module>
from gym.envs.mujoco.mujoco_env import MujocoEnv
File "C:\Users\Amine\AppData\Roaming\Python\Python36\site-packages\gym\envs\mujoco\mujoco_env.py", line 14, in <module>
raise error.DependencyNotInstalled("{}. (HINT: you need to install mujoco_py, and also perform the setup instructions here: https://github.com/openai/mujoco-py/.)".format(e))
gym.error.DependencyNotInstalled: No module named 'mujoco_py'. (HINT: you need to install mujoco_py, and also perform the setup instructions here: https://github.com/openai/mujoco-py/.)
I just could not find any resource/website that explains step-by-step how to install it on windows. I have the other classic environments such as CartPole and MountainCar from classic control. However, the ones from mujoco are the most used in papers.