Error in Motecarlo Methods using gym_walk


There is an error when using the gym_walk module:

user:~/catkin_ws/src/rl_course_files/fly_drone/scripts$ python
[2022-10-26 13:18:20,470] Making new env: RandomWalk-v0
Traceback (most recent call last):
File “”, line 188, in
env = gym.make(‘RandomWalk-v0’)
File “/usr/local/lib/python2.7/dist-packages/gym/envs/”, line 161, in make
return registry.make(id)
File “/usr/local/lib/python2.7/dist-packages/gym/envs/”, line 119, in make
env = spec.make()
File “/usr/local/lib/python2.7/dist-packages/gym/envs/”, line 85, in make
cls = load(self._entry_point)
File “/usr/local/lib/python2.7/dist-packages/gym/envs/”, line 17, in load
result = entry_point.load(False)
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 2443, in load
return self.resolve()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 2449, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/home/user/.local/lib/python2.7/site-packages/gym_walk/envs/”, line 1, in
from gym_walk.envs.walk_env import WalkEnv
File “/home/user/.local/lib/python2.7/site-packages/gym_walk/envs/”, line 10, in
from gym.envs.toy_text.utils import categorical_sample
ImportError: No module named utils

I tried to search about this module into the gym_walk distribution but it apparently does not appear. I can not continue with the course because of this.

Could you help me please?


Also, the excercise in section 4.5 where the FVMC is implemented does not work!!! Because the error in gym_walk.


Hello @eblady ,

I was looking at this last Friday but couldn’t find a proper fix, Let me give it a 2nd look today and come back to you.