Closed ashkan-leo closed 1 year ago
Hi @ashkan-leo, torch
is a dependency required prior to installing torchsort
. Please ensure PyTorch is installed prior to installing torchsort
, and you shouldn't run into this issue.
If you are still having problems, please provide the full list of commands you are using to install the library so I can reproduce the issue :)
@teddykoker thanks for getting back. I have installed torch and can verify that I can import it as well. The issue seems to be isolated to torchsort
Does the torchsort installation work now that torch is installed?
No it’s not working
On November 13, 2022 at 14:55 GMT, Teddy Koker @.***> wrote:
Does the torchsort installation work now that torch is installed?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Can you provide the error output, as well as the steps taken to reproduce the error?
I have been using torch
in a project managed by poetry
and tried to install torchsort
via poetry add torchsort
. The install failed with the same error as OP. Full error trace:
poetry add torchsort
Using version ^0.1.9 for torchsort
Updating dependencies
Resolving dependencies... (0.6s)
Package operations: 1 install, 0 updates, 0 removals
• Installing torchsort (0.1.9): Failed
ChefBuildError
Backend subprocess exited when trying to invoke get_requires_for_build_wheel
Traceback (most recent call last):
File "/Users/petrgazarov/Library/Application Support/pypoetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/petrgazarov/Library/Application Support/pypoetry/venv/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 "/Users/petrgazarov/Library/Application Support/pypoetry/venv/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 "/private/var/folders/xg/dfqs_csd2p536h5xrjc2d_k80000gn/T/tmpm48nga82/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/xg/dfqs_csd2p536h5xrjc2d_k80000gn/T/tmpm48nga82/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/private/var/folders/xg/dfqs_csd2p536h5xrjc2d_k80000gn/T/tmpm48nga82/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "/private/var/folders/xg/dfqs_csd2p536h5xrjc2d_k80000gn/T/tmpm48nga82/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 8, in <module>
ModuleNotFoundError: No module named 'torch'
at ~/Library/Application Support/pypoetry/venv/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:
Note: This error originates from the build backend, and is likely not a problem with poetry but with torchsort (0.1.9) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "torchsort (==0.1.9)"'.
Hi @petrgazarov, I don't think this is an issue specific to torchsort, but with PyTorch extension packages in general this thread might have some potential solutions (swapping xformers
to torchsort
).
Thanks - I gave those solutions a go, but I wasn't able to solve the install errors. I ended up just copying the code from your post here, along with Google's fast-soft-sort repo.
Hello I am installing the package using poetry and I get the following error. Any tip how I can do this?