microsoft / TextWorld

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

Install Issues #349

Closed Cu2ta1n closed 1 month ago

Cu2ta1n commented 1 month ago

Hello! I have some question installing Textworld `Building wheels for collected packages: textworld Building wheel for textworld (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for textworld (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [127 lines of output] /tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/config/_apply_pyprojecttoml.py:72: _MissingDynamic: description defined outside of pyproject.toml is ignored. !!

          ********************************************************************************
          The following seems to be defined outside of `pyproject.toml`:

          `description = 'Microsoft Textworld - A Text-based Learning Environment.'`

          According to the spec (see the link below), however, setuptools CANNOT
          consider this value unless `description` is listed as `dynamic`.

          https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table

          To prevent this problem, you can list `description` under `dynamic` or alternatively
          remove the `[project]` table from your file and rely entirely on other means of
          configuration.
          ********************************************************************************

  !!
    _handle_missing_dynamic(dist, project_table)
  /tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/config/_apply_pyprojecttoml.py:72: _MissingDynamic: `authors` defined outside of `pyproject.toml` is ignored.
  !!

          ********************************************************************************
          The following seems to be defined outside of `pyproject.toml`:

          `authors = 'Microsoft Textworld'`

          According to the spec (see the link below), however, setuptools CANNOT
          consider this value unless `authors` is listed as `dynamic`.

          https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table

          To prevent this problem, you can list `authors` under `dynamic` or alternatively
          remove the `[project]` table from your file and rely entirely on other means of
          configuration.
          ********************************************************************************

  !!
    _handle_missing_dynamic(dist, project_table)
  /tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/config/_apply_pyprojecttoml.py:72: _MissingDynamic: `classifiers` defined outside of `pyproject.toml` is ignored.
  !!

          ********************************************************************************
          The following seems to be defined outside of `pyproject.toml`:

          `classifiers = ['Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: MacOS', 'Operating System :: POSIX', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Topic :: Scientific/Engineering :: Artificial Life']`

          According to the spec (see the link below), however, setuptools CANNOT
          consider this value unless `classifiers` is listed as `dynamic`.

          https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table

          To prevent this problem, you can list `classifiers` under `dynamic` or alternatively
          remove the `[project]` table from your file and rely entirely on other means of
          configuration.
          ********************************************************************************

  !!
    _handle_missing_dynamic(dist, project_table)
  running bdist_wheel
  running build
  running build_py
  + echo 'Running setup.sh...'
  Running setup.sh...
  ++ uname -s
  + unameOut=Linux
  + case "${unameOut}" in
  + machine=Linux
  + cd textworld/thirdparty/
  + '[' '!' -e I7_6M62_Linux_all.tar.gz ']'
  + '[' '!' -d inform7-6M62 ']'
  + echo 'Installing Inform7 CLI'
  Installing Inform7 CLI
  + cd inform7-6M62/
  + tar xzf inform7-common_6M62_all.tar.gz
  tar (child): inform7-common_6M62_all.tar.gz: Cannot open: No such file or directory
  tar (child): Error is not recoverable: exiting now
  tar: Child returned status 2
  tar: Error is not recoverable: exiting now
  Traceback (most recent call last):
    File "/data2/Anaconda3/envs/reflexion/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/data2/Anaconda3/envs/reflexion/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/data2/Anaconda3/envs/reflexion/lib/python3.9/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 "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 415, in build_wheel
      return self._build_with_temp_dir(
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 41, in <module>
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 106, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 974, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 974, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 974, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-h59vxx8r/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "<string>", line 37, in run
    File "<string>", line 18, in _pre_install
    File "/data2/Anaconda3/envs/reflexion/lib/python3.9/subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['./setup.sh']' returned non-zero exit status 2.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel 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 month ago

Hi, can you let me know what operating system you are using and the actually command line you use to initiate the installation? Also, can you confirm you saw "echo "Downloading Inform7 CLI" in your logs at some point as I don't see it in the logs you shared in your post (I assume you tried the installation multiple times?).

zouyingcao commented 1 month ago

Hi, can you let me know what operating system you are using and the actually command line you use to initiate the installation? Also, can you confirm you saw "echo "Downloading Inform7 CLI" in your logs at some point as I don't see it in the logs you shared in your post (I assume you tried the installation multiple times?).

I have the same question in Mac M3pro. Failed to build textworld ERROR: Could not build wheels for textworld, which is required to install pyproject.toml-based projects

MarcCote commented 1 month ago

Can you share the output of

pip install -vvv textworld
zouyingcao commented 1 month ago

Can you share the output of

pip install -vvv textworld

curl: (56) Recv failure: Operation timed out Traceback (most recent call last): File "/opt/anaconda3/envs/alfworld_env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/opt/anaconda3/envs/alfworld_env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(hook_input['kwargs']) File "/opt/anaconda3/envs/alfworld_env/lib/python3.9/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/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 415, in build_wheel return self._build_with_temp_dir( File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir self.run_setup() File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup exec(code, locals()) File "", line 41, in File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/init.py", line 108, in setup return distutils.core.setup(attrs) File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 184, in setup return run_commands(dist) File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 200, in run_commands dist.run_commands() File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands self.run_command(cmd) File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 974, in run_command super().run_command(command) File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command cmd_obj.run() File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/command/bdist_wheel.py", line 373, in run self.run_command("build") File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 974, in run_command super().run_command(command) File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command cmd_obj.run() File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 974, in run_command super().run_command(command) File "/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-env-v7vgyevj/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command cmd_obj.run() File "", line 37, in run File "", line 18, in _pre_install File "/opt/anaconda3/envs/alfworld_env/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['./setup.sh']' returned non-zero exit status 56. error: subprocess-exited-with-error

× Building wheel for textworld (pyproject.toml) 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. full command: /opt/anaconda3/envs/alfworld_env/bin/python /opt/anaconda3/envs/alfworld_env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/tmpk3gn9w9q cwd: /private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-install-rkfxk6vp/textworld_ef88a04b9fc043b294d74857cef8d6d0 Building wheel for textworld (pyproject.toml) ... error ERROR: Failed building wheel for textworld Failed to build textworld ERROR: Could not build wheels for textworld, which is required to install pyproject.toml-based projects Exception information: Traceback (most recent call last): File "/opt/anaconda3/envs/alfworld_env/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper status = run_func(*args) File "/opt/anaconda3/envs/alfworld_env/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper return func(self, options, args) File "/opt/anaconda3/envs/alfworld_env/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 429, in run raise InstallationError( pip._internal.exceptions.InstallationError: Could not build wheels for textworld, which is required to install pyproject.toml-based projects Remote version of pip: 24.1.2 Local version of pip: 24.0 Was pip installed by pip? False Removed build tracker: '/private/var/folders/nv/wk66ml_j44z55mdwf8f8gxgr0000gp/T/pip-build-tracker-rpvfunz4'

MarcCote commented 1 month ago

Does this command work for you?

curl -LO http://emshort.com/inform-app-archive/6M62/I7-6M62-OSX-Interim.dmg
MarcCote commented 1 month ago

@zouyingcao @Cu2ta1n any updates on this. One of you has tried to curl the above link?

zouyingcao commented 1 month ago

@zouyingcao @Cu2ta1n any updates on this. One of you has tried to curl the above link? % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 36.8M 100 36.8M 0 0 28699 0 0:22:25 0:22:25 --:--:-- 22384 It runs well, but what does this link ref to?

MarcCote commented 1 month ago

In the output log you shared above, the error message was

curl: (56) Recv failure: Operation timed out

The only curl operation during TextWorld installation is the one to download Inform7 binaries (see setup.sh).

I'm very confused now. Can you try again the following command. Maybe there was some network outage last time you tried?

pip install -vvv textworld
zouyingcao commented 1 month ago

In the output log you shared above, the error message was

curl: (56) Recv failure: Operation timed out

The only curl operation during TextWorld installation is the one to download Inform7 binaries (see setup.sh).

I'm very confused now. Can you try again the following command. Maybe there was some network outage last time you tried?

pip install -vvv textworld

Maybe you are right. This time, building wheel for textworld run successfully. Thanks for your time!

MarcCote commented 1 month ago

Those are the best type of fixes :D. Thanks for reporting back.