Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Installing gymnasium[accept-rom-license] fails with python 3.11 #436

Closed
arxaqapi opened this issue Apr 6, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@arxaqapi
Copy link

arxaqapi commented Apr 6, 2023

Describe the bug

Installing gymnasium with pipenv and the accept-rom-licence flag does not work with python 3.11.2 but does work correctly using python 3.10 and pipenv.

gymnasium[atari] does install correctly on either python version.

It looks like the error is comming from AutoROM.

Code example

pipenv install gymnasium[accept-rom-license]

or

```bash
pip install gymnasium[accept-rom-license]

Error message dump:


/tmp/tempotest via 🐍 v3.11.2 (tempotest) 
❯ pipenv install gymnasium[accept-rom-license]
Installing gymnasium[accept-rom-license]...
Error:  An error occurred while installing gymnasium[accept-rom-license]!
Error text: Requirement already satisfied: gymnasium[accept-rom-license] in /home/aq/.local/share/virtualenvs/tempotest-KfbXtbJa/lib/python3.11/site-packages (from -r /tmp/pipenv-z492ddxr-requirements/pipenv-6yowvlng-requirement.txt (line 1)) (0.28.1)
Requirement already satisfied: numpy>=1.21.0 in /home/aq/.local/share/virtualenvs/tempotest-KfbXtbJa/lib/python3.11/site-packages (from gymnasium[accept-rom-license]->-r /tmp/pipenv-z492ddxr-requirements/pipenv-6yowvlng-requirement.txt (line 1)) (1.24.2)
Requirement already satisfied: jax-jumpy>=1.0.0 in /home/aq/.local/share/virtualenvs/tempotest-KfbXtbJa/lib/python3.11/site-packages (from gymnasium[accept-rom-license]->-r /tmp/pipenv-z492ddxr-requirements/pipenv-6yowvlng-requirement.txt (line 1)) (1.0.0)
Requirement already satisfied: cloudpickle>=1.2.0 in /home/aq/.local/share/virtualenvs/tempotest-KfbXtbJa/lib/python3.11/site-packages (from gymnasium[accept-rom-license]->-r /tmp/pipenv-z492ddxr-requirements/pipenv-6yowvlng-requirement.txt (line 1)) (2.2.1)
Requirement already satisfied: typing-extensions>=4.3.0 in /home/aq/.local/share/virtualenvs/tempotest-KfbXtbJa/lib/python3.11/site-packages (from gymnasium[accept-rom-license]->-r /tmp/pipenv-z492ddxr-requirements/pipenv-6yowvlng-requirement.txt (line 1)) (4.5.0)
Requirement already satisfied: farama-notifications>=0.0.1 in /home/aq/.local/share/virtualenvs/tempotest-KfbXtbJa/lib/python3.11/site-packages (from gymnasium[accept-rom-license]->-r /tmp/pipenv-z492ddxr-requirements/pipenv-6yowvlng-requirement.txt (line 1)) (0.0.4)
Collecting autorom[accept-rom-license]~=0.4.2
  Using cached AutoROM-0.4.2-py3-none-any.whl (16 kB)
Collecting click
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting requests
  Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting tqdm
  Using cached tqdm-4.65.0-py3-none-any.whl (77 kB)
Collecting AutoROM.accept-rom-license
  Using cached AutoROM.accept-rom-license-0.6.0.tar.gz (434 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
  Using cached AutoROM.accept-rom-license-0.5.5.tar.gz (22 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'

/home/aq/.local/lib/python3.10/site-packages/pipenv/vendor/attr/_make.py:876: RuntimeWarning: Running interpreter doesn't sufficiently support code object introspection.  Some features like bare super() or accessing __class__ will not work with slotted classes.
  set_closure_cell(cell, cls)
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      /home/aq/.local/lib/python3.10/site-packages/pipenv/vendor/attr/_make.py:876: RuntimeWarning: Running interpreter doesn't sufficiently support code object introspection.  Some features like bare super() or accessing __class__ will not work with slotted classes.
        set_closure_cell(cell, cls)
      Ignoring importlib-resources: markers 'python_version < "3.9"' don't match your environment
      Collecting setuptools
        Using cached setuptools-67.6.1-py3-none-any.whl (1.1 MB)
      Collecting wheel
        Using cached wheel-0.40.0-py3-none-any.whl (64 kB)
      Collecting requests
        Using cached requests-2.28.2-py3-none-any.whl (62 kB)
      Collecting tqdm
        Using cached tqdm-4.65.0-py3-none-any.whl (77 kB)
      ERROR: Could not find a version that satisfies the requirement libtorrent (from versions: none)
      ERROR: No matching distribution found for libtorrent
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

✘ Installation Failed


### System info

- Gymnasium was installed using `pipenv`.
- I am using archlinux, Linux kernel version is 6.2.8.
- Python version which makes the installation fail is 3.11.2

### Additional context

_No response_

### Checklist

- [X] I have checked that there is no similar [issue](https://github.com/Farama-Foundation/Gymnasium/issues) in the repo
@arxaqapi arxaqapi added the bug Something isn't working label Apr 6, 2023
@jjshoots
Copy link
Member

jjshoots commented Apr 6, 2023

Apologies for this oversight, but it seems that autorom still has the libtorrent legacy requirement. This has been fixed in the latest autorom release, and your problem should be fixed now by running pip install gymnasium[accept-rom-license] --no-cache-dir.

@arxaqapi
Copy link
Author

arxaqapi commented Apr 7, 2023

Thank you, this solved the problem.

For pipenv users, the following command solves the problem and adds the package to the Pipfile.

pipenv install gymnasium[accept-rom-license, atari] --extra-pip-args="--no-cache-dir"

@arxaqapi arxaqapi closed this as completed Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants