ageron / handson-ml3

A series of Jupyter notebooks that walk you through the fundamentals of Machine Learning and Deep Learning in Python using Scikit-Learn, Keras and TensorFlow 2.
Apache License 2.0
7.73k stars 3.1k forks source link

Problem creating HOML3 environment on M2 #49

Open lxlofpku opened 1 year ago

lxlofpku commented 1 year ago

The problem I encountered seems identical to the post https://github.com/ageron/handson-ml3/issues/35, but I am trying to create it on MacBook Air M2 not Windows. However, I followed the suggestions in that post:

  1. Comment out the line "- gym[classic_control,atari,accept-rom-license]~=0.26.1" in environment.yml, then run "conda env create -f environment.yml" again. It went through smoothly without a problem.
  2. conda activate homl3
  3. Run 'pip install "gym[classic_control]~=0.26.2" ' It went throgh smoothly without a problem.
  4. Run 'pip install "gym[atari]~=0.26.2" ' It went throgh smoothly without a problem..
  5. Run 'pip install "gym[atari,accept-rom-license]~=0.26.2" ' It does not go through, with the following error messages:

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 ╰─> [467 lines of output] ......... icense_2f193bcf7ba24e08abf0d13bb4ca9490/AutoROM.py", line 173, in torrent_tar raise RuntimeError( RuntimeError: Terminating attempt to download ROMs after 180 seconds, this has failed, please report it. [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

Thank you in advance for any help.

The complete mesages are appended below (it is too long so not convenient to take a screenshot):

(homl3) lxl@Black-Tiger handson-ml3 % pip install "gym[atari,accept-rom-license]~=0.26.2" Requirement already satisfied: gym[accept-rom-license,atari]~=0.26.2 in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (0.26.2) Requirement already satisfied: cloudpickle>=1.2.0 in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from gym[accept-rom-license,atari]~=0.26.2) (2.2.1) Requirement already satisfied: numpy>=1.18.0 in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from gym[accept-rom-license,atari]~=0.26.2) (1.23.5) Requirement already satisfied: gym-notices>=0.0.4 in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from gym[accept-rom-license,atari]~=0.26.2) (0.0.8) Requirement already satisfied: ale-py~=0.8.0 in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from gym[accept-rom-license,atari]~=0.26.2) (0.8.1) Collecting autorom[accept-rom-license]~=0.4.2 Using cached AutoROM-0.4.2-py3-none-any.whl (16 kB) Requirement already satisfied: importlib-resources in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from ale-py~=0.8.0->gym[accept-rom-license,atari]~=0.26.2) (5.12.0) Requirement already satisfied: typing-extensions in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from ale-py~=0.8.0->gym[accept-rom-license,atari]~=0.26.2) (4.4.0) Requirement already satisfied: requests in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from autorom[accept-rom-license]~=0.4.2->gym[accept-rom-license,atari]~=0.26.2) (2.28.2) Requirement already satisfied: tqdm in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from autorom[accept-rom-license]~=0.4.2->gym[accept-rom-license,atari]~=0.26.2) (4.64.1) Requirement already satisfied: click in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from autorom[accept-rom-license]~=0.4.2->gym[accept-rom-license,atari]~=0.26.2) (8.1.3) Collecting AutoROM.accept-rom-license Using cached AutoROM.accept-rom-license-0.5.5.tar.gz (22 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting libtorrent Using cached libtorrent-2.0.7-cp310-cp310-macosx_10_9_x86_64.whl (5.6 MB) Requirement already satisfied: certifi>=2017.4.17 in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from requests->autorom[accept-rom-license]~=0.4.2->gym[accept-rom-license,atari]~=0.26.2) (2022.12.7) Requirement already satisfied: idna<4,>=2.5 in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from requests->autorom[accept-rom-license]~=0.4.2->gym[accept-rom-license,atari]~=0.26.2) (3.4) Requirement already satisfied: charset-normalizer<4,>=2 in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from requests->autorom[accept-rom-license]~=0.4.2->gym[accept-rom-license,atari]~=0.26.2) (2.1.1) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages (from requests->autorom[accept-rom-license]~=0.4.2->gym[accept-rom-license,atari]~=0.26.2) (1.26.14) 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 ╰─> [467 lines of output] running bdist_wheel running build running build_py creating build creating build/lib copying AutoROM.py -> build/lib installing to build/bdist.macosx-10.9-x86_64/wheel running install running install_lib creating build/bdist.macosx-10.9-x86_64 creating build/bdist.macosx-10.9-x86_64/wheel copying build/lib/AutoROM.py -> build/bdist.macosx-10.9-x86_64/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.macosx-10.9-x86_64/wheel/AutoROM.accept_rom_license-0.5.5-py3.10.egg-info running install_scripts time=0 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=0 total payload download=0 total failed bytes=0 time=5 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=0 total payload download=0 total failed bytes=0 time=10 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=0 total payload download=0 total failed bytes=0 time=15 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=0 total payload download=0 total failed bytes=0 time=20 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=25 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=30 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=35 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=40 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=45 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=50 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=55 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=60 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=65 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=70 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=75 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=80 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=85 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=90 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=95 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=100 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=105 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=110 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=115 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=120 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=125 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=130 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=135 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=140 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=145 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=150 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=155 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=160 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=165 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=170 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 time=175 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=180 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=185 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=190 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=195 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=200 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=205 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=210 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=215 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=220 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=225 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=230 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=235 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=240 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=245 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=250 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=255 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=260 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=265 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=270 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=275 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=280 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=285 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=290 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=295 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=300 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=305 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=310 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=315 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=320 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=325 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=330 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=335 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=340 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=345 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=350 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 Have been attempting to download for more than 180 seconds, consider terminating? time=355 / 180 seconds - Trying to download atari roms current status=downloading metadata (downloading_metadata) total downloaded bytes=281 total payload download=0 total failed bytes=0 AutoROM will download the Atari 2600 ROMs. They will be installed to: /private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-install-pp_3ry5t/autorom-accept-rom-license_2f193bcf7ba24e08abf0d13bb4ca9490/build/bdist.macosx-10.9-x86_64/wheel/AutoROM/roms

  Existing ROMs will be overwritten.
  Traceback (most recent call last):
    File "/Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/lxl/opt/anaconda3/envs/homl3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 413, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 484, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
      exec(code, locals())
    File "<string>", line 18, in <module>
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
      return distutils.core.setup(**attrs)
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1221, in run_command
      super().run_command(command)
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 360, in run
      self.run_command("install")
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1221, in run_command
      super().run_command(command)
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-build-env-ce1n6e7j/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "<string>", line 15, in run
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-install-pp_3ry5t/autorom-accept-rom-license_2f193bcf7ba24e08abf0d13bb4ca9490/AutoROM.py", line 350, in main
      with open(torrent_tar() if source_file is None else source_file, "rb") as fh:
    File "/private/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/pip-install-pp_3ry5t/autorom-accept-rom-license_2f193bcf7ba24e08abf0d13bb4ca9490/AutoROM.py", line 173, in torrent_tar
      raise RuntimeError(
  RuntimeError: Terminating attempt to download ROMs after 180 seconds, this has failed, please report it.
  [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

lxlofpku commented 1 year ago

Sorry but the problem seems having been solved. I did nothing but just try and try again, after many times, it seems succeeded with the ending message saying: "Successfully built AutoROM.accept-rom-license Installing collected packages: libtorrent, AutoROM.accept-rom-license, autorom Successfully installed AutoROM.accept-rom-license-0.5.5 autorom-0.4.2 libtorrent-2.0.7"

From internet somewhere I read the following information: "I suspect that the issue is with the torrent seeding server as it has a relatively small number of available download slots. Therefore, if there is a large amount of traffic this might cause issue for users." I don't know if this is the cause of the problem.

luotn commented 1 year ago

I'm also having problems during environment setup.

Device I'm using: 2021 14" MacBook Pro, config: 8CPU + 14GPU, 16G ram, 512Gb SSD.

I have installed TensorFlow along with Tensor-Metal Plug-in from apple, but it seems that the setup script is looking for another version of TensorFlow and causing pip subprocess error:

ERROR: Could not find a version that satisfies the requirement tensorflow~=2.10.0 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0) ERROR: No matching distribution found for tensorflow~=2.10.0

Is there a way to update the setup script to recognise that it's running on apple silicon and adapt accordingly?

OR

I could use Colab and stop worrying about studying offline.

luotn commented 1 year ago

Hey there, me again. I found a solution which would fully(I hope, still testing) install everything without a problem on Apple Silicon Macs. NOTE: I'm using 2021 14inch MacBook Pro with M1 Pro SoC, your milage may vary depending on your SoC. PS: This solution is very much a work in progress, please follow at your own risk. I modified two files used in the install process: environment.yml and requirements.txt. The following steps applies to both these files unless specified.

  1. Delete all version specifications(e.g. ~=2.10.0) from all packages to use the latest packages.
  2. Comment out tensorflow-addons. (tensorflow-addons is deprecated therefore no source could be located)
  3. Add new line in environment.yml: - tensorflow-metal # Translates tensorflow's CUDA API to Metal API -- MODIFIED (Apple Silicon uses Metal instead of CUDA. This should translate between these two APIs without issues, STILL TESTING)
  4. Change gym[Box2D,atari,accept-rom-license] to gymnasium[Box2D,atari,accept-rom-license] (Gym changed it's name in 2020 to gymnasium, some refactor: import gymnasium as gym might be necessary when running code in this project.)
  5. Change tensorflow-serving-api~=2.10.0 # or tensorflow-serving-api-gpu if gpu to tensorflow-serving-api-gpu # or tensorflow-serving-api if no gpu (I think tensorflow-metal installed in step 3 would make use of gpu in Apple Silicon, STILL TESTING)