Reputation: 77
When I run the below code, i got the error Module not found.
import gym
import gym_robot
import numpy as np
env = gym.make('robot-v0')
state_size = env.observation_space.shape[0]
action_size = env.action_space.n
Error is ModuleNotFoundError: No module named 'gym_robot.envs.helper'
I made a github repository https://github.com/zoraiz-ali/gym where anyone check the files.
Upvotes: 0
Views: 1764
Reputation: 1262
I've cloned your repo and installed the package doing pip install .
from the root folder
Then I ran
import gym
import gym_robot
import numpy as np
env = gym.make('robot-v0')
state_size = env.observation_space.shape[0]
action_size = env.action_space.n
print(env.observation_space.shape[0])
print(env.action_space.n)
Everything worked fine, got 360
and 5
for both prints respectively, could you be more specific on your error ? Did you install the package with pip ?
Upvotes: 1