Categories
Artificial Intelligence (AI) Mastering Development

No registered env with id: BanditTenArmedGaussian-v0 for the package gym_bandits of OpenAI [migrated]

I’ve made the following instruction :

git clone https://github.com/JKCooper2/gym-bandits.git
cd gym-bandits
pip install -e .

After installing :

import gym_bandits
import gym

Now we finally :

env = gym.make("BanditTenArmedGaussian-v0")

Even tough the first three steps was successfull, the last one doesn’t work. Here is my error :

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
c:\windows\system32\gym\gym\envs\registration.py in spec(self, path)
    120         try:
--> 121             return self.env_specs[id]
    122         except KeyError:

KeyError: 'BanditTenArmedGaussian-v0'

During handling of the above exception, another exception occurred:

UnregisteredEnv                           Traceback (most recent call last)
<ipython-input-13-645d2b1dfa73> in <module>
      4 import math
      5 import random
----> 6 env = gym.make("BanditTenArmedGaussian-v0")

c:\windows\system32\gym\gym\envs\registration.py in make(id, **kwargs)
    143 
    144 def make(id, **kwargs):
--> 145     return registry.make(id, **kwargs)
    146 
    147 def spec(id):

c:\windows\system32\gym\gym\envs\registration.py in make(self, path, **kwargs)
     87         else:
     88             logger.info('Making new env: %s', path)
---> 89         spec = self.spec(path)
     90         env = spec.make(**kwargs)
     91         # We used to have people override _reset/_step rather than

c:\windows\system32\gym\gym\envs\registration.py in spec(self, path)
    129                 raise error.DeprecatedEnv('Env {} not found (valid versions include {})'.format(id, matching_envs))
    130             else:
--> 131                 raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
    132 
    133     def register(self, id, **kwargs):

UnregisteredEnv: No registered env with id: BanditTenArmedGaussian-v0

Does anyone know how to fix it ?

Thanks and regards.

Leave a Reply

Your email address will not be published. Required fields are marked *