microsoft / TextWorld

​TextWorld is a sandbox learning environment for the training and evaluation of reinforcement learning (RL) agents on text-based games.
Other
1.22k stars 189 forks source link

Fail to install on M1/M2 Macos (arm64) #310

Closed MarcCote closed 1 year ago

MarcCote commented 1 year ago
          I try to install on the M2 Macos but failed with:

Building wheels for collected packages: textworld Building wheel for textworld (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [138 lines of output] running bdist_wheel running build running build_py

× Encountered error while trying to install package. ╰─> textworld

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

Originally posted by @SpaceLearner in https://github.com/microsoft/TextWorld/issues/130#issuecomment-1457368399

MarcCote commented 1 year ago

@SpaceLearner @Kamildebbagh The issue is most likely due to the fact that M1/M2 laptop are using arm64. The Inform7 release used by TextWorld doesn't support that architecture. Anyway, the first step would be to try this

pip install https://github.com/MarcCote/TextWorld/archive/refs/heads/fix_setup_macos.zip 

If that doesn't work try the following:

pip install https://github.com/MarcCote/TextWorld/archive/refs/heads/inform_1.10.zip

Please let me know if either one works for you.

Kamildebbagh commented 1 year ago

Hi Marc, thank you for getting back to me so quickly. Unfortunately neither of your fixes did the trick :/ . FYI I had successfully installed inform_10_1_2_macOS_1_82_3.dmg before.

Here are the outputs for your two commands:


pip install https://github.com/MarcCote/TextWorld/archive/refs/heads/fix_setup_macos.zip

Collecting https://github.com/MarcCote/TextWorld/archive/refs/heads/fix_setup_macos.zip Using cached https://github.com/MarcCote/TextWorld/archive/refs/heads/fix_setup_macos.zip Preparing metadata (setup.py) ... done Requirement already satisfied: numpy>=1.14.5 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from textworld==1.5.3) (1.24.3) Requirement already satisfied: tqdm>=4.17.1 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from textworld==1.5.3) (4.65.0) Collecting cffi>=1.0.0 (from textworld==1.5.3) Using cached cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl (174 kB) Collecting networkx>=2 (from textworld==1.5.3) Using cached networkx-3.1-py3-none-any.whl (2.1 MB) Collecting more_itertools (from textworld==1.5.3) Using cached more_itertools-9.1.0-py3-none-any.whl (54 kB) Collecting tatsu<5,>=4.3.0 (from textworld==1.5.3) Using cached TatSu-4.4.0-py2.py3-none-any.whl (85 kB) Collecting hashids>=1.2.0 (from textworld==1.5.3) Using cached hashids-1.3.1-py2.py3-none-any.whl (6.6 kB) Collecting jericho>=3.0.3 (from textworld==1.5.3) Using cached jericho-3.1.2-py3-none-any.whl Collecting mementos>=1.3.1 (from textworld==1.5.3) Using cached mementos-1.3.1-py2.py3-none-any.whl (12 kB) Requirement already satisfied: prompt_toolkit in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from textworld==1.5.3) (3.0.38) Collecting gym<0.26,>=0.10.11 (from textworld==1.5.3) Using cached gym-0.25.2-py3-none-any.whl Collecting pycparser (from cffi>=1.0.0->textworld==1.5.3) Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB) Collecting cloudpickle>=1.2.0 (from gym<0.26,>=0.10.11->textworld==1.5.3) Using cached cloudpickle-2.2.1-py3-none-any.whl (25 kB) Collecting gym-notices>=0.0.4 (from gym<0.26,>=0.10.11->textworld==1.5.3) Using cached gym_notices-0.0.8-py3-none-any.whl (3.0 kB) Collecting spacy>=2.1.0 (from jericho>=3.0.3->textworld==1.5.3) Using cached spacy-3.5.2-cp310-cp310-macosx_11_0_arm64.whl (6.6 MB) Requirement already satisfied: wcwidth in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from prompt_toolkit->textworld==1.5.3) (0.2.6) Collecting spacy-legacy<3.1.0,>=3.0.11 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached spacy_legacy-3.0.12-py2.py3-none-any.whl (29 kB) Collecting spacy-loggers<2.0.0,>=1.0.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached spacy_loggers-1.0.4-py3-none-any.whl (11 kB) Collecting murmurhash<1.1.0,>=0.28.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached murmurhash-1.0.9-cp310-cp310-macosx_11_0_arm64.whl (19 kB) Collecting cymem<2.1.0,>=2.0.2 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached cymem-2.0.7-cp310-cp310-macosx_11_0_arm64.whl (30 kB) Collecting preshed<3.1.0,>=3.0.2 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached preshed-3.0.8-cp310-cp310-macosx_11_0_arm64.whl (101 kB) Collecting thinc<8.2.0,>=8.1.8 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached thinc-8.1.9-cp310-cp310-macosx_11_0_arm64.whl (775 kB) Collecting wasabi<1.2.0,>=0.9.1 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached wasabi-1.1.1-py3-none-any.whl (27 kB) Collecting srsly<3.0.0,>=2.4.3 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached srsly-2.4.6-cp310-cp310-macosx_11_0_arm64.whl (490 kB) Collecting catalogue<2.1.0,>=2.0.6 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached catalogue-2.0.8-py3-none-any.whl (17 kB) Collecting typer<0.8.0,>=0.3.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached typer-0.7.0-py3-none-any.whl (38 kB) Collecting pathy>=0.10.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached pathy-0.10.1-py3-none-any.whl (48 kB) Collecting smart-open<7.0.0,>=5.2.1 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached smart_open-6.3.0-py3-none-any.whl (56 kB) Requirement already satisfied: requests<3.0.0,>=2.13.0 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (2.29.0) Requirement already satisfied: pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (1.10.7) Collecting jinja2 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB) Requirement already satisfied: setuptools in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (67.7.2) Requirement already satisfied: packaging>=20.0 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (23.1) Collecting langcodes<4.0.0,>=3.2.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached langcodes-3.3.0-py3-none-any.whl (181 kB) Requirement already satisfied: typing-extensions>=4.2.0 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (4.5.0) Requirement already satisfied: charset-normalizer<4,>=2 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from requests<3.0.0,>=2.13.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (3.1.0) Requirement already satisfied: idna<4,>=2.5 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from requests<3.0.0,>=2.13.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (3.4) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from requests<3.0.0,>=2.13.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (1.26.15) Requirement already satisfied: certifi>=2017.4.17 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from requests<3.0.0,>=2.13.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (2022.12.7) Collecting blis<0.8.0,>=0.7.8 (from thinc<8.2.0,>=8.1.8->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached blis-0.7.9-cp310-cp310-macosx_11_0_arm64.whl (1.1 MB) Collecting confection<1.0.0,>=0.0.1 (from thinc<8.2.0,>=8.1.8->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached confection-0.0.4-py3-none-any.whl (32 kB) Collecting click<9.0.0,>=7.1.1 (from typer<0.8.0,>=0.3.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached click-8.1.3-py3-none-any.whl (96 kB) Collecting MarkupSafe>=2.0 (from jinja2->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl (17 kB) Building wheels for collected packages: textworld Building wheel for textworld (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [42 lines of output] /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/init.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

  !!
    dist.fetch_build_eggs(dist.setup_requires)
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-nifs6o68/setup.py", line 41, in <module>
      setup(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 106, in setup
      _install_setup_requires(attrs)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 79, in _install_setup_requires
      _fetch_build_eggs(dist)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 84, in _fetch_build_eggs
      dist.fetch_build_eggs(dist.setup_requires)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/dist.py", line 917, in fetch_build_eggs
      return _fetch_build_eggs(self, requires)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 827, in resolve
      dist = self._resolve_dist(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 863, in _resolve_dist
      dist = best[req.key] = env.best_match(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1133, in best_match
      return self.obtain(req, installer)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1145, in obtain
      return installer(requirement)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/installer.py", line 101, in _fetch_build_egg_no_warn
      wheel.install_as_egg(dist_location)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 117, in install_as_egg
      self._install_as_egg(destination_eggdir, zf)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 125, in _install_as_egg
      self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 171, in _convert_metadata
      os.rename(dist_info, egg_info)
  OSError: [Errno 66] Directory not empty: '/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-nifs6o68/.eggs/cffi-1.15.1-py3.10-macosx-11.0-arm64.egg/cffi-1.15.1.dist-info' -> '/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-nifs6o68/.eggs/cffi-1.15.1-py3.10-macosx-11.0-arm64.egg/EGG-INFO'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for textworld Running setup.py clean for textworld error: subprocess-exited-with-error

× python setup.py clean did not run successfully. │ exit code: 1 ╰─> [42 lines of output] /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/init.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

  !!
    dist.fetch_build_eggs(dist.setup_requires)
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-nifs6o68/setup.py", line 41, in <module>
      setup(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 106, in setup
      _install_setup_requires(attrs)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 79, in _install_setup_requires
      _fetch_build_eggs(dist)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 84, in _fetch_build_eggs
      dist.fetch_build_eggs(dist.setup_requires)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/dist.py", line 917, in fetch_build_eggs
      return _fetch_build_eggs(self, requires)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 827, in resolve
      dist = self._resolve_dist(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 863, in _resolve_dist
      dist = best[req.key] = env.best_match(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1133, in best_match
      return self.obtain(req, installer)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1145, in obtain
      return installer(requirement)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/installer.py", line 101, in _fetch_build_egg_no_warn
      wheel.install_as_egg(dist_location)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 117, in install_as_egg
      self._install_as_egg(destination_eggdir, zf)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 125, in _install_as_egg
      self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 171, in _convert_metadata
      os.rename(dist_info, egg_info)
  OSError: [Errno 66] Directory not empty: '/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-nifs6o68/.eggs/cffi-1.15.1-py3.10-macosx-11.0-arm64.egg/cffi-1.15.1.dist-info' -> '/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-nifs6o68/.eggs/cffi-1.15.1-py3.10-macosx-11.0-arm64.egg/EGG-INFO'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed cleaning build dir for textworld Failed to build textworld ERROR: Could not build wheels for textworld, which is required to install pyproject.toml-based projects


pip install https://github.com/MarcCote/TextWorld/archive/refs/heads/inform_1.10.zip

Collecting https://github.com/MarcCote/TextWorld/archive/refs/heads/inform_1.10.zip Downloading https://github.com/MarcCote/TextWorld/archive/refs/heads/inform_1.10.zip / 3.4 MB 5.2 MB/s 0:00:00 Preparing metadata (setup.py) ... done Requirement already satisfied: numpy>=1.14.5 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from textworld==1.5.3) (1.24.3) Requirement already satisfied: tqdm>=4.17.1 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from textworld==1.5.3) (4.65.0) Collecting cffi>=1.0.0 (from textworld==1.5.3) Using cached cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl (174 kB) Collecting networkx>=2 (from textworld==1.5.3) Using cached networkx-3.1-py3-none-any.whl (2.1 MB) Collecting more_itertools (from textworld==1.5.3) Using cached more_itertools-9.1.0-py3-none-any.whl (54 kB) Collecting tatsu<5,>=4.3.0 (from textworld==1.5.3) Using cached TatSu-4.4.0-py2.py3-none-any.whl (85 kB) Collecting hashids>=1.2.0 (from textworld==1.5.3) Using cached hashids-1.3.1-py2.py3-none-any.whl (6.6 kB) Collecting jericho>=3.0.3 (from textworld==1.5.3) Using cached jericho-3.1.2-py3-none-any.whl Collecting mementos>=1.3.1 (from textworld==1.5.3) Using cached mementos-1.3.1-py2.py3-none-any.whl (12 kB) Requirement already satisfied: prompt_toolkit in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from textworld==1.5.3) (3.0.38) Collecting gym<0.26,>=0.10.11 (from textworld==1.5.3) Using cached gym-0.25.2-py3-none-any.whl Collecting pycparser (from cffi>=1.0.0->textworld==1.5.3) Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB) Collecting cloudpickle>=1.2.0 (from gym<0.26,>=0.10.11->textworld==1.5.3) Using cached cloudpickle-2.2.1-py3-none-any.whl (25 kB) Collecting gym-notices>=0.0.4 (from gym<0.26,>=0.10.11->textworld==1.5.3) Using cached gym_notices-0.0.8-py3-none-any.whl (3.0 kB) Collecting spacy>=2.1.0 (from jericho>=3.0.3->textworld==1.5.3) Using cached spacy-3.5.2-cp310-cp310-macosx_11_0_arm64.whl (6.6 MB) Requirement already satisfied: wcwidth in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from prompt_toolkit->textworld==1.5.3) (0.2.6) Collecting spacy-legacy<3.1.0,>=3.0.11 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached spacy_legacy-3.0.12-py2.py3-none-any.whl (29 kB) Collecting spacy-loggers<2.0.0,>=1.0.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached spacy_loggers-1.0.4-py3-none-any.whl (11 kB) Collecting murmurhash<1.1.0,>=0.28.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached murmurhash-1.0.9-cp310-cp310-macosx_11_0_arm64.whl (19 kB) Collecting cymem<2.1.0,>=2.0.2 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached cymem-2.0.7-cp310-cp310-macosx_11_0_arm64.whl (30 kB) Collecting preshed<3.1.0,>=3.0.2 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached preshed-3.0.8-cp310-cp310-macosx_11_0_arm64.whl (101 kB) Collecting thinc<8.2.0,>=8.1.8 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached thinc-8.1.9-cp310-cp310-macosx_11_0_arm64.whl (775 kB) Collecting wasabi<1.2.0,>=0.9.1 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached wasabi-1.1.1-py3-none-any.whl (27 kB) Collecting srsly<3.0.0,>=2.4.3 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached srsly-2.4.6-cp310-cp310-macosx_11_0_arm64.whl (490 kB) Collecting catalogue<2.1.0,>=2.0.6 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached catalogue-2.0.8-py3-none-any.whl (17 kB) Collecting typer<0.8.0,>=0.3.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached typer-0.7.0-py3-none-any.whl (38 kB) Collecting pathy>=0.10.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached pathy-0.10.1-py3-none-any.whl (48 kB) Collecting smart-open<7.0.0,>=5.2.1 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached smart_open-6.3.0-py3-none-any.whl (56 kB) Requirement already satisfied: requests<3.0.0,>=2.13.0 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (2.29.0) Requirement already satisfied: pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (1.10.7) Collecting jinja2 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB) Requirement already satisfied: setuptools in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (67.7.2) Requirement already satisfied: packaging>=20.0 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (23.1) Collecting langcodes<4.0.0,>=3.2.0 (from spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached langcodes-3.3.0-py3-none-any.whl (181 kB) Requirement already satisfied: typing-extensions>=4.2.0 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (4.5.0) Requirement already satisfied: charset-normalizer<4,>=2 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from requests<3.0.0,>=2.13.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (3.1.0) Requirement already satisfied: idna<4,>=2.5 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from requests<3.0.0,>=2.13.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (3.4) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from requests<3.0.0,>=2.13.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (1.26.15) Requirement already satisfied: certifi>=2017.4.17 in /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages (from requests<3.0.0,>=2.13.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) (2022.12.7) Collecting blis<0.8.0,>=0.7.8 (from thinc<8.2.0,>=8.1.8->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached blis-0.7.9-cp310-cp310-macosx_11_0_arm64.whl (1.1 MB) Collecting confection<1.0.0,>=0.0.1 (from thinc<8.2.0,>=8.1.8->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached confection-0.0.4-py3-none-any.whl (32 kB) Collecting click<9.0.0,>=7.1.1 (from typer<0.8.0,>=0.3.0->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached click-8.1.3-py3-none-any.whl (96 kB) Collecting MarkupSafe>=2.0 (from jinja2->spacy>=2.1.0->jericho>=3.0.3->textworld==1.5.3) Using cached MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl (17 kB) Building wheels for collected packages: textworld Building wheel for textworld (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [42 lines of output] /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/init.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

  !!
    dist.fetch_build_eggs(dist.setup_requires)
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-cks6irxy/setup.py", line 41, in <module>
      setup(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 106, in setup
      _install_setup_requires(attrs)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 79, in _install_setup_requires
      _fetch_build_eggs(dist)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 84, in _fetch_build_eggs
      dist.fetch_build_eggs(dist.setup_requires)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/dist.py", line 917, in fetch_build_eggs
      return _fetch_build_eggs(self, requires)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 827, in resolve
      dist = self._resolve_dist(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 863, in _resolve_dist
      dist = best[req.key] = env.best_match(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1133, in best_match
      return self.obtain(req, installer)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1145, in obtain
      return installer(requirement)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/installer.py", line 101, in _fetch_build_egg_no_warn
      wheel.install_as_egg(dist_location)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 117, in install_as_egg
      self._install_as_egg(destination_eggdir, zf)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 125, in _install_as_egg
      self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 171, in _convert_metadata
      os.rename(dist_info, egg_info)
  OSError: [Errno 66] Directory not empty: '/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-cks6irxy/.eggs/cffi-1.15.1-py3.10-macosx-11.0-arm64.egg/cffi-1.15.1.dist-info' -> '/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-cks6irxy/.eggs/cffi-1.15.1-py3.10-macosx-11.0-arm64.egg/EGG-INFO'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for textworld Running setup.py clean for textworld error: subprocess-exited-with-error

× python setup.py clean did not run successfully. │ exit code: 1 ╰─> [42 lines of output] /Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/init.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

  !!
    dist.fetch_build_eggs(dist.setup_requires)
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-cks6irxy/setup.py", line 41, in <module>
      setup(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 106, in setup
      _install_setup_requires(attrs)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 79, in _install_setup_requires
      _fetch_build_eggs(dist)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/__init__.py", line 84, in _fetch_build_eggs
      dist.fetch_build_eggs(dist.setup_requires)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/dist.py", line 917, in fetch_build_eggs
      return _fetch_build_eggs(self, requires)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 827, in resolve
      dist = self._resolve_dist(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 863, in _resolve_dist
      dist = best[req.key] = env.best_match(
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1133, in best_match
      return self.obtain(req, installer)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1145, in obtain
      return installer(requirement)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/installer.py", line 101, in _fetch_build_egg_no_warn
      wheel.install_as_egg(dist_location)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 117, in install_as_egg
      self._install_as_egg(destination_eggdir, zf)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 125, in _install_as_egg
      self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
    File "/Users/kamildebbagh/Documents/Doctrine/ChatGPT/AtelierGPT/Atelier3(27-04-2024)/Code/reflexion-main/.conda/lib/python3.10/site-packages/setuptools/wheel.py", line 171, in _convert_metadata
      os.rename(dist_info, egg_info)
  OSError: [Errno 66] Directory not empty: '/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-cks6irxy/.eggs/cffi-1.15.1-py3.10-macosx-11.0-arm64.egg/cffi-1.15.1.dist-info' -> '/private/var/folders/s3/qyn3rwp937nfwnllhp19f3gh0000gn/T/pip-req-build-cks6irxy/.eggs/cffi-1.15.1-py3.10-macosx-11.0-arm64.egg/EGG-INFO'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed cleaning build dir for textworld Failed to build textworld ERROR: Could not build wheels for textworld, which is required to install pyproject.toml-based projects

MarcCote commented 1 year ago

Thanks for trying. Sadly, we don't see the output of setup.sh. Could you try to git clone my branch and manually run setup.sh?

git clone https://github.com/MarcCote/TextWorld
cd TextWorld
git checkout fix_setup_macos
./setup.sh
Kamildebbagh commented 1 year ago

Thanks, here's the whole thing for setup.sh:

--

(base) ➜ alfworld_runs git clone https://github.com/MarcCote/TextWorld

Cloning into 'TextWorld'... remote: Enumerating objects: 5670, done. remote: Counting objects: 100% (752/752), done. remote: Compressing objects: 100% (361/361), done. remote: Total 5670 (delta 426), reused 627 (delta 371), pack-reused 4918 Receiving objects: 100% (5670/5670), 20.17 MiB | 22.67 MiB/s, done. Resolving deltas: 100% (3493/3493), done.

--

(base) ➜ alfworld_runs ls TextWorld base_run_logs prompts run_reflexion.sh pycache env_history.py reflexion_few_shot_examples.txt trash alfworld_trial.py generate_reflections.py reflexion_run_logs utils.py base_config.yaml main.py run_base.sh

--

(base) ➜ alfworld_runs cd TextWorld

--

(base) ➜ TextWorld git:(main) ls CHANGELOG.md README.md docker notebooks scripts tests CONTRIBUTING.md SECURITY.md docs requirements-full.txt setup.py textworld LICENSE.txt TODO.md glk_build.py requirements-vis.txt setup.sh tools MANIFEST.in benchmark misc requirements.txt src tox.ini

--

(base) ➜ TextWorld git:(main) git checkout fix_setup_macos branch 'fix_setup_macos' set up to track 'origin/fix_setup_macos'. Switched to a new branch 'fix_setup_macos'

--

(base) ➜ TextWorld git:(fix_setup_macos) git checkout fix_setup_macos Already on 'fix_setup_macos' Your branch is up to date with 'origin/fix_setup_macos'.

--

(base) ➜ TextWorld git:(fix_setup_macos) ls CHANGELOG.md README.md docker notebooks scripts tests CONTRIBUTING.md SECURITY.md docs requirements-full.txt setup.py textworld LICENSE.txt TODO.md glk_build.py requirements-vis.txt setup.sh tools MANIFEST.in benchmark misc requirements.txt src tox.ini

--

(base) ➜ TextWorld git:(fix_setup_macos) ./setup.sh

--

➜ TextWorld git:(fix_setup_macos) ✗ ls
CHANGELOG.md README.md docker notebooks scripts tests CONTRIBUTING.md SECURITY.md docs requirements-full.txt setup.py textworld LICENSE.txt TODO.md glk_build.py requirements-vis.txt setup.sh tools MANIFEST.in benchmark misc requirements.txt src tox.ini

--

MarcCote commented 1 year ago

Everything looks fine! Then, in the TextWorld folder, do

pip install .

You can test if the install works with the following:

tw-make custom --world-size 5 --nb-objects 10 --quest-length 5 --seed 1234 --output tw_games/custom_game.z8
tw-play tw_games/custom_game.z8
MarcCote commented 1 year ago

@Kamildebbagh I just noticed you are using Python 3.10. TextWorld supports up to 3.9 at the moment. Some dependencies need to be updated before we can support 3.10.

MarcCote commented 1 year ago

@Kamildebbagh I managed to do some testing on a M1. #311 appears to indeed have fixed the issue you mentioned above. If you are not using a dedicated conda environment to run your code, I'd suggest you create one.

CONDA_SUBDIR=osx-64 conda create -n textworld python=3.9 

Closing this issue, feel free to re-open if that doesn't work.

MarcCote commented 1 year ago

TextWorld 1.5.4 is now on PyPi and should be pip installable on M1/2.