Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py depends on torch #204

Closed
dyollb opened this issue Feb 1, 2024 · 4 comments · Fixed by #208
Closed

setup.py depends on torch #204

dyollb opened this issue Feb 1, 2024 · 4 comments · Fixed by #208

Comments

@dyollb
Copy link

dyollb commented Feb 1, 2024

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.

image

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)?

@rusty1s
Copy link
Owner

rusty1s commented Feb 1, 2024

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.

@dyollb
Copy link
Author

dyollb commented Feb 1, 2024

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

which gives me:
image

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):
image

@rusty1s
Copy link
Owner

rusty1s commented Feb 2, 2024

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) :(

@dyollb
Copy link
Author

dyollb commented Feb 2, 2024

Okay, understood. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants