igdb-api-python icon indicating copy to clipboard operation
igdb-api-python copied to clipboard

Pipenv and Poetry install error

Open Sanhajio opened this issue 1 year ago • 0 comments

Installing the package with poetry or pipenv returns this error

  • Installing igdb-api-v4 (3.11.4 9026d38): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke get_requires_for_build_wheel

  Traceback (most recent call last):
    File "/home/sanhajio/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/sanhajio/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/sanhajio/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpqlqovfc7/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpqlqovfc7/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "/tmp/tmpqlqovfc7/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup
      super().run_setup(setup_script=setup_script)
    File "/tmp/tmpqlqovfc7/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 9, in <module>
    File "<frozen os>", line 679, in __getitem__
  KeyError: 'VERSION'


  at ~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/poetry/installation/chef.py:166 in _prepare
      162│
      163│                 error = ChefBuildError("\n\n".join(message_parts))
      164│
      165│             if error is not None:
    → 166│                 raise error from None
      167│
      168│             return path
      169│
      170│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

The workaround is to set VERSION before installing:

VERSION="0.3.2" poetry install

Sanhajio avatar Mar 04 '24 07:03 Sanhajio