setup.py depends on `torch`
dyollb opened this issue · 4 comments
I would like to create a python package that installs its dependencies properly using pip
.
Unfortunately, the install fails because pytorch-cluster expects torch
to already be installed.
Simply trying to install torch-cluster using pip install torch-cluster
fails. First, you need to install pytorch, and only then install pytorch-cluster.
Originally I hoped it would simply suffice to add torch
here. But the setup.py depends on torch to build. It seems that pytorch C++ extensions are done in this way.
Is there any workaround (using pip
)?
The only workaround for this right now is to install from the wheels page (i.e., by specifying -f
in the pip install
command). This way, torch
is not required to install the package.
hmm. I did that but it doesn't work. I tried installing (copy pasted from the README) via
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.1.0+cpu.html
System specs:
- Python 3.10.11
- Apple M2
- Sonoma 14.0
- Darwin Kernel Version 23.0.0
Btw, independent of the issue above, surely torch-cluster
should explicitly depend on torch
. Currently it doesn't (see here):
That's because you are trying to install on Apple M2 for which do not exist pre-built wheels (only for Intel-Mac at the moment) :(
Okay, understood. Thanks!