Open
Description
I am trying to install by Poetry. However, it seems this library failed to be installed because of PEP 517 build support.
pyproject.toml:
[tool.poetry]
name = "my-app"
version = "1.0.0"
description = ""
authors = ["Hongbo Miao"]
[tool.poetry.dependencies]
python = "3.8.x"
torch = "1.13.1"
torch-cluster = "1.6.1"
torch-geometric = "2.3.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
➜ poetry env use 3.8
➜ poetry lock --no-update
➜ poetry install --no-root
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing torch-cluster (1.6.1): Pending...
• Installing torch-cluster (1.6.1): Preparing...
• Installing torch-cluster (1.6.1): Failed
ChefBuildError
Backend subprocess exited when trying to invoke get_requires_for_build_wheel
Traceback (most recent call last):
File "/opt/homebrew/Cellar/poetry/1.5.1_1/libexec/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/opt/homebrew/Cellar/poetry/1.5.1_1/libexec/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 "/opt/homebrew/Cellar/poetry/1.5.1_1/libexec/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 "/var/folders/22/ntjwd5dx691gvkktkspl0f_00000gq/T/tmp3ud_ljj_/.venv/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/var/folders/22/ntjwd5dx691gvkktkspl0f_00000gq/T/tmp3ud_ljj_/.venv/lib/python3.8/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/var/folders/22/ntjwd5dx691gvkktkspl0f_00000gq/T/tmp3ud_ljj_/.venv/lib/python3.8/site-packages/setuptools/build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "/var/folders/22/ntjwd5dx691gvkktkspl0f_00000gq/T/tmp3ud_ljj_/.venv/lib/python3.8/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 8, in <module>
ModuleNotFoundError: No module named 'torch'
at /opt/homebrew/Cellar/poetry/1.5.1_1/libexec/lib/python3.11/site-packages/poetry/installation/chef.py:147 in _prepare
143│
144│ error = ChefBuildError("\n\n".join(message_parts))
145│
146│ if error is not None:
→ 147│ raise error from None
148│
149│ return path
150│
151│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with torch-cluster (1.6.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "torch-cluster (==1.6.1)"'.
make: *** [poetry-install] Error 1
I further verified based on the method in the log by
➜ pip wheel --use-pep517 "torch-cluster (==1.6.1)"
Collecting torch-cluster==1.6.1
Downloading torch_cluster-1.6.1.tar.gz (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.8/53.8 kB 988.6 kB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
Traceback (most recent call last):
File "/Users/hongbo-miao/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
main()
File "/Users/hongbo-miao/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongbo-miao/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/22/ntjwd5dx691gvkktkspl0f_00000gq/T/pip-build-env-tlczvsao/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/22/ntjwd5dx691gvkktkspl0f_00000gq/T/pip-build-env-tlczvsao/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/private/var/folders/22/ntjwd5dx691gvkktkspl0f_00000gq/T/pip-build-env-tlczvsao/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/22/ntjwd5dx691gvkktkspl0f_00000gq/T/pip-build-env-tlczvsao/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 8, in <module>
ModuleNotFoundError: No module named 'torch'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
Any guide would be appreciate, thanks! 😃