Farama-Foundation / Gymnasium

An API standard for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
https://gymnasium.farama.org
MIT License
7.39k stars 836 forks source link

[Bug Report] Accept ROM license no longer works in 1.0 #1201

Closed mk-0 closed 1 month ago

mk-0 commented 1 month ago

Describe the bug

I run pip install --force-reinstall "gymnasium[atari, accept-rom-license]==0.29.1" with Python 3.11.10, and it works as expected:

>>> import gymnasium as gym
>>> env = gym.make("ALE/Assault-v5")
A.L.E: Arcade Learning Environment (version 0.8.1+53f58b7)
[Powered by Stella]

But with pip install --force-reinstall "gymnasium[atari, accept-rom-license]==1.0" There is a warning during installation: WARNING: gymnasium 1.0.0 does not provide the extra 'accept-rom-license' and then:

Python 3.11.10 (main, Oct  3 2024, 07:29:13) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gymnasium as gym
>>> gym.make("ALE/Assault-v5")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mk/miniconda3/envs/rl/lib/python3.11/site-packages/gymnasium/envs/registration.py", line 687, in make
    env_spec = _find_spec(id)
               ^^^^^^^^^^^^^^
  File "/home/mk/miniconda3/envs/rl/lib/python3.11/site-packages/gymnasium/envs/registration.py", line 531, in _find_spec
    _check_version_exists(ns, name, version)
  File "/home/mk/miniconda3/envs/rl/lib/python3.11/site-packages/gymnasium/envs/registration.py", line 397, in _check_version_exists
    _check_name_exists(ns, name)
  File "/home/mk/miniconda3/envs/rl/lib/python3.11/site-packages/gymnasium/envs/registration.py", line 360, in _check_name_exists
    _check_namespace_exists(ns)
  File "/home/mk/miniconda3/envs/rl/lib/python3.11/site-packages/gymnasium/envs/registration.py", line 354, in _check_namespace_exists
    raise error.NamespaceNotFound(f"Namespace {ns} not found. {suggestion_msg}")
gymnasium.error.NamespaceNotFound: Namespace ALE not found. Have you installed the proper package for ALE?

Code example

No response

System info

Ubuntu 22.04 LTS, Python 3.11.10. pip install gymnasium==1.0

Additional context

No response

Checklist

mk-0 commented 1 month ago

Sorry, I should have read the release notes, can't delete the issue it seems. Running import ale_py solves the problem.