I'm trying to use OpenAI Gymnasium to build game environments on my Windows machine. I read that I'm supposed to install ale-py in order to use the game environments. However, pip literally thinks ale-py doesn't exist??? Am I missing something? Any help is appreciated. See error below:
C:\Users\jarre>pip install ale-py
ERROR: Could not find a version that satisfies the requirement ale-py (from versions: none)
ERROR: No matching distribution found for ale-py
I also have an additional problem installing the Atari game environments in Gymnasium. When trying pip install gymnasium[atari], pip finds multiple versions with "conflicting dependencies" and won't install anything.
Collecting gymnasium[atari]
Using cached gymnasium-0.27.0-py3-none-any.whl.metadata (8.5 kB)
Using cached Gymnasium-0.26.3-py3-none-any.whl.metadata (5.8 kB)
INFO: pip is looking at multiple versions of gymnasium[atari] to determine which version is compatible with other requirements. This could take a while.
Using cached gymnasium-0.26.2-py3-none-any.whl.metadata (4.1 kB)
Using cached gymnasium-0.26.1-py3-none-any.whl.metadata (4.1 kB)
ERROR: Cannot install gymnasium[atari]==0.26.1, gymnasium[atari]==0.26.2 and gymnasium[atari]==0.26.3 because these package versions have conflicting dependencies.
The conflict is caused by:
gymnasium[atari] 0.26.3 depends on ale-py~=0.8.0; extra == "atari"
gymnasium[atari] 0.26.2 depends on ale-py~=0.8.0; extra == "atari"
gymnasium[atari] 0.26.1 depends on ale-py~=0.8.0; extra == "atari"
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
Trying pip install gym[atari]==0.19.0 results in an error with setup.py egg_info.
C:\Users\jarre>pip3 install gym[atari]==0.19.0
Collecting gym==0.19.0 (from gym[atari]==0.19.0)
Using cached gym-0.19.0.tar.gz (1.6 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
[end of output]
I tried installing from https://github.com/Farama-Foundation/Arcade-Learning-Environment but it says "failed building wheel for ale-py".
The Python Package Index, PyPI, which pip uses to get its packages from, has no binary build for the combination of ale-py and Python 3.12. Nor is there a source distribution of ale-py on PyPI, so pip can't use that either to try and build it locally.
Using Python 3.11 instead of 3.12 should work.
Alternatively, you could wait until a 3.12 release is out, or perhaps ask about the status on a 3.12 binary release on the ale-py issue tracker (sometimes, a dependency causes a delay, so then it can't be done before the dependency is 3.12 compatible).