#3201·gym

ALE Namespace does not exist.

Author: NervoloadCreated Mar 28, 2023Updated Jan 27, 2025

I am attempting to access the Atari environments, and upon importing the latest versions of ale-py, autorom, gym, gymnasium even, I get the following error when attempting to make and environment of any space under the ALE namespace:

env = gym.make(ALE/Breakout-v5)


NamespaceNotFound Traceback (most recent call last) in 1 env_name = 'ALE/Breakout-v5' ----> 2 env = gym.make(env_name)

4 frames /usr/local/lib/python3.9/dist-packages/gym/envs/registration.py in _assert_namespace_exists(self, namespace) 266 else: 267 message += f" Have you installed the proper package for {namespace}?" --> 268 raise error.NamespaceNotFound(message) 269 270 def _assert_name_exists(self, namespace: Optional[str], name: str) -> None:

NamespaceNotFound: Namespace ALE does not exist. Have you installed the proper package for ALE?

Yes, I did in fact download namespace ALE.

This may be a notebook exclusive error, but it did happen on my personal base python3.10. Somehow, after reinstalling and changing a bunch of packages, I actually got it to work on my personal computer.

I suspect that gym.make pulls from existing files under gym/envs, and somehow the ALE package does not reroute the directory when attaching the namespace to it. I will play with this to try to figure out the solution by added the ALE roms to the gym/envs folder, or by changing the namespaces directly.

gym version: 0.28.1

System Info Describe the characteristic of your environment: ipynb, notebook =

  • Describe how Gym was installed (pip, docker, source, ...) latest version of pip, google colab AND MacOS latest M1 (but it ended up working there)