farama-foundation / autorom Goto Github PK
View Code? Open in Web Editor NEWA tool to automate installing Atari ROMs for the Arcade Learning Environment
License: MIT License
A tool to automate installing Atari ROMs for the Arcade Learning Environment
License: MIT License
Hi everyone, we've recently taken the feedback from everyone and made a new release (0.5.5) for AutoROM. In this release, you're able to bypass the requirement for torrenting if you already have the pre-torrented tar available. This should solve all™ of the issues at hand. To use the new release:
pip3 install autorom>=0.5.5
.AutoROM --accept-license --source-file path/to/Roms.tar.gz
.Disclaimer: The Roms.tar.gz are currently hosted on a personal GDrive account. For legal reasons these cannot be hosted on the main github repo. As such, availability of the Roms via GDrive is not guaranteed.
pip install autorom[accept-rom-license]
returns
zsh: no matches found: autorom[accept-rom-license]
Workaround:
pip install "autorom[accept-rom-license]"
It does work on bash.
windows python 3.9.13 AutoROM Version: 0.5.0
pip install gym[accept-rom-license]
same error Farama-Foundation/Arcade-Learning-Environment#477
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: gym[accept-rom-license] in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (0.23.1)
Requirement already satisfied: numpy>=1.18.0 in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from gym[accept-rom-license]) (1.24.0)
Requirement already satisfied: importlib-metadata>=4.10.0 in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from gym[accept-rom-license]) (4.12.0)
Requirement already satisfied: cloudpickle>=1.2.0 in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from gym[accept-rom-license]) (1.6.0)
Requirement already satisfied: gym-notices>=0.0.4 in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from gym[accept-rom-license]) (0.0.8)
Collecting autorom[accept-rom-license]=0.4.2=0.4.2->gym[accept-rom-license]) (2.28.1)
Using cached http://mirrors.aliyun.com/pypi/packages/83/aa/e2695fa0c93b39cfe2065fcd189e7eb2db88f6e0922e932fc615827070da/AutoROM-0.4.2-py3-none-any.whl (16 kB)
Requirement already satisfied: requests in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from autorom[accept-rom-license]
Requirement already satisfied: tqdm in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from
autorom[accept-rom-license]=0.4.2->gym[accept-rom-license]) (4.61.1)=0.4.2->gym[accept-rom-license]) (8.0.0)
Requirement already satisfied: click in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from autorom[accept-rom-license]
Collecting AutoROM.accept-rom-license
Using cached http://mirrors.aliyun.com/pypi/packages/da/7e/7207e22fa5d7c37d2e15b69ed3fc0890fa42bc447e18d556ba0e3122dc75/AutoROM.accept-rom-license-0.5.0.tar.gz (10 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: zipp>=0.5 in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from importlib-metadata>=4.10.0->gym[accept-rom-license]) (3.8.1)
Requirement already satisfied: libtorrent in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages
(from AutoROM.accept-rom-license->autorom[accept-rom-license]=0.4.2->gym[accept-rom-license]) (2.0.7)=0.4.2->gym[accept-rom-license]) (0.4.5)
Requirement already satisfied: colorama in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from click->autorom[accept-rom-license]
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from requests->autorom[accept-rom-license]=0.4.2->gym[accept-rom-license]) (2.1.1)=0.4.2->gym[accept-rom-license]) (1.26.13)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from requests->autorom[accept-rom-license]
Requirement already satisfied: idna<4,>=2.5 in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from requests->autorom[accept-rom-license]=0.4.2->gym[accept-rom-license]) (3.4)=0.4.2->gym[accept-rom-license]) (2022.12.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\hasee\appdata\local\programs\python\python-3.9.13\lib\site-packages (from requests->autorom[accept-rom-license]
Building wheels for collected packages: AutoROM.accept-rom-license
Building wheel for AutoROM.accept-rom-license (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for AutoROM.accept-rom-license (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [66 lines of output]
C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running bdist_wheel
running build
running build_py
creating build
creating build\lib
copying AutoROM.py -> build\lib
installing to build\bdist.win-amd64\wheel
running install
running install_lib
creating build\bdist.win-amd64
creating build\bdist.win-amd64\wheel
copying build\lib\AutoROM.py -> build\bdist.win-amd64\wheel.
running install_egg_info
running egg_info
writing AutoROM.accept_rom_license.egg-info\PKG-INFO
writing dependency_links to AutoROM.accept_rom_license.egg-info\dependency_links.txt
writing requirements to AutoROM.accept_rom_license.egg-info\requires.txt
writing top-level names to AutoROM.accept_rom_license.egg-info\top_level.txt
reading manifest file 'AutoROM.accept_rom_license.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'AutoROM.accept_rom_license.egg-info\SOURCES.txt'
Copying AutoROM.accept_rom_license.egg-info to build\bdist.win-amd64\wheel.\AutoROM.accept_rom_license-0.5.0-py3.9.egg-info
running install_scripts
Traceback (most recent call last):
File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 351, in
main()
File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 249, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools\build_meta.py", line 413, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools\build_meta.py", line 398, in _build_with_temp_dir
self.run_setup()
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools\build_meta.py", line 484, in run_setup
super(BuildMetaLegacyBackend,
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "", line 18, in
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools_init.py",
line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 360, in run
self.run_command("install")
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\hasee\AppData\Local\Temp\pip-build-env-3xhqja51\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "", line 11, in run
File "C:\Users\hasee\AppData\Local\Temp\pip-install-qgzsj_qq\autorom-accept-rom-license_78c29192845749e38f7a8f143b8a4a94\AutoROM.py", line 13, in
import libtorrent as lt
ImportError: DLL load failed while importing libtorrent: 找不到指定的模块。
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for AutoROM.accept-rom-license
Failed to build AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects
errorlink:arvidn/libtorrent#7245
This error prevents me from running gym normally.Please fix this error as soon as possible
I was trying to run my algorithm on the Pong environment from PettingZoo for this project, but I kept getting errors. The first one is, when I try to install the multi agent ale package, it does not happen fully (I tried this in google colab and my local system). The second one is a consequence of the first one due to which I cannot run the environment. I have attached the images of the errors that I encountered at various stages.
In one of the images, there is a link to your github repository, which was given as reference for when there is an error, but I could not find anything that helped me with this problem nor any stackoverflow or github blog for that matter.
This is the code and the packages I have been trying to download:
!pip install gymnasium matplotlib numpy atari-py gym[atari,accept-rom-license]
!pip install ale-py gym[all] git --upgrade git+[https://github.com/openai/gym`](https://github.com/openai/gym%60)
!pip install gym[box2d]
!pip install pettingzoo
!pip install pymunk
!pip install multi_agent_ale_py autorom
from pettingzoo.atari import pong_v3
env = pong_v3.env(num_players=2)
Hi there,
I am facing the same issue in #24.
However, installing 0.4.2
does not solve the issue.
File "/tmp/pip-install-ig3zv0fw/autorom-accept-rom-license_b5788b79c9fd43ae826c9bed60314c16/AutoROM.py", line 200, in torrent_tar_to_buffer
raise RuntimeError("Tried to download ROMs 3 times, which have all failed, please try again or report this issue.")
RuntimeError: Tried to download ROMs 3 times, which have all failed, please try again or report this issue.
Note the 0.4.2
still refers to AutorROM.accept-rom-license-0.5.4.tar.gz
:
ip install autorom[accept-rom-license]==0.4.2 --no-cache-dir
Collecting autorom[accept-rom-license]==0.4.2
Downloading AutoROM-0.4.2-py3-none-any.whl (16 kB)
Collecting AutoROM.accept-rom-license
Downloading AutoROM.accept-rom-license-0.5.4.tar.gz (12 kB)
I wonder if it is a license issue, but through the download page description I don't think it limits the download. Please correct me if I'm wrong, many thanks!
System: Ubuntu 20.04
conda virtual env , python=3.8
Hello, I ran the AutoROM.py and I can't seem to proceed from there,the terminal stays at the following line:
"I agree to not distribute these ROMs and wish to proceed: [Y/n]: y"
It would be helpful to know if running AutoROM to get those roms require access to certain websites because my network is monitored. I can then try to request access from my IT department.
Kindly assist me with this. Thank you.
python3 AutoROM.py
AutoROM.py:228: UserWarning: ale-py package seems to be empty. Perhaps try reinstalling ale-py.
warnings.warn(
AutoROM will download the Atari 2600 ROMs.
They will be installed to:
/home/polaris/anaconda3/envs/py38/lib/python3.8/site-packages/multi_agent_ale_py/roms
Existing ROMs will be overwritten.
I own a license to these Atari 2600 ROMs.
I agree to not distribute these ROMs and wish to proceed: [Y/n]: y
When I run pip install "autorom[accept-rom-license]"
, I get the following error:
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: https://github.com/urllib3/urllib3/issues/2168
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for AutoROM.accept-rom-license
Failed to build AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects
Any way someone can help with this?
Environment
ISSUE
Installed autorom
but raised an error:
raise IOError(f"rom {game} is not installed. Please install roms using AutoROM tool
(https://github.com/PettingZoo-Team/AutoROM) "
OSError: rom boxing is not installed. Please install roms using AutoROM tool (
https://github.com/PettingZoo-Team/AutoROM) or specify and double-check
the path to your Atari rom using the `rom_path` argument.
Where is AutoRom installed: miniconda3/envs/workspace/lib/python3.7/site-packages/AutoROM/
(and there are no binary files).
Expected: miniconda3/envs/workspace/lib/python3.7/site-packages/multi_agent_ale_py/ROM/{game}/{game.bin}
I run pip install autorom[accept-rom-license]
on Ubuntu 18.04.5. Then it shows:
Building wheel for AutoROM.accept-rom-license (pyproject.toml) ... done
ERROR: Failed building wheel for AutoROM.accept-rom-license
Failed to build AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects
However, I have already installed pyproject-toml.
AutoRom install appears to no longer work. Looks like the process fails to connect to s2roms.cc.
Running AutoRom -v
gives the following:
AutoROM will download the Atari 2600 ROMs in link_map.txt from atarimania.com and s2roms.cc.
They will be installed to
/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/multi_agent_ale_py/ROM/
for use with Multi-Agent-ALE-py. Existing ROMS will be overwritten.
Traceback (most recent call last):
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
OSError: [Errno 113] No route to host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f0f25e49b50>: Failed to establish a new connection: [Errno 113] No route to host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='s2roms.cc', port=443): Max retries exceeded with url: /s3roms/Atari%202600/P-T/Tetris%202600%20%28Colin%20Hughes%29.zip (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f0f25e49b50>: Failed to establish a new connection: [Errno 113] No route to host'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kaleab/anaconda3/envs/mava-exp/bin/AutoROM", line 15, in <module>
AutoROM.main(args.accept, specific_dir=args.dir)
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/AutoROM/AutoROM.py", line 237, in main
manual_downloads(installation_dirs, manual_map, checksum_map)
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/AutoROM/AutoROM.py", line 98, in manual_downloads
download = requests.get(link)
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/home/kaleab/anaconda3/envs/mava-exp/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='s2roms.cc', port=443): Max retries exceeded with url: /s3roms/Atari%202600/P-T/Tetris%202600%20%28Colin%20Hughes%29.zip (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f0f25e49b50>: Failed to establish a new connection: [Errno 113] No route to host'))
You can see more of the stack trace here - https://github.com/instadeepai/Mava/pull/299/checks?check_run_id=3349654636 .
An issue in openai/gym#3172 was reported that is actually an issue in AutoROM
They report that this blog post solves the issue which seems to be related to loading files with french characters but this is surprising as it will be still unicode characters
https://blog.csdn.net/weixin_42662776/article/details/128514253
Right now, ALL does something like this:
AutoROM --accept-license
python -m atari_py.import_roms $(python -c 'import site; print(site.getsitepackages()[0])')/multi_agent_ale_py/ROM
Which feel unnecessary.
I got the same error on Python 3.8 and 3.9. The following error prints out on Python 3.10:
❯ pip install AutoROM.accept-rom-license
Collecting AutoROM.accept-rom-license
Using cached AutoROM.accept-rom-license-0.5.0.tar.gz (10 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [11 lines of output]
Ignoring importlib-resources: markers 'python_version < "3.9"' don't match your environment
Collecting setuptools
Using cached setuptools-65.6.3-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting requests
Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting tqdm
Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 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.
Workaround was to install 0.42 explicitly: pip install AutoROM.accept-rom-license==0.4.2
Running AutoROM prints this:
$ AutoROM --install-dir atari
AutoROM will download the Atari 2600 ROMs.
They will be installed to:
/home/aclrc/atari
Existing ROMs will be overwritten.
I own a license to these Atari 2600 ROMs.
I agree to not distribute these ROMs and wish to proceed: [Y/n]: n
I don't work for Atari. How can I answer yes without lying?
Is there any plan to build wheels for python 3.11? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.