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

torch missing when running setup.py #363

Closed
martinResearch opened this issue Aug 22, 2024 · 2 comments
Closed

torch missing when running setup.py #363

martinResearch opened this issue Aug 22, 2024 · 2 comments

Comments

@martinResearch
Copy link
Contributor

Problem
I am trying to install gsplat from source among other librairies with a requirements.txt and pip install -r requirements but that fails because it tries to compile gsplat with pytorch before pytorch is installed (all the package get installed at the end after all the packages are build).

Solution
To prevent this, pytorch should be listed in a list provided of packages needed to run setup.py through the setup_requires argument in setup.py (see https://setuptools.pypa.io/en/latest/references/keywords.html) or using https://peps.python.org/pep-0518/

@liruilong940607
Copy link
Collaborator

Hey! It's actually pretty tricky to put pytorch into setup.py so we rely on user to install it manually before installing gsplat.

Installation of pytorch depends on the CUDA version that lives in your machine, and different CUDA corresponds to different installation command, as shown here: https://pytorch.org/get-started/locally/

The fundamental reason is that the platform compatibility tags supported by PyPI does not include CUDA version. So PyPI can not be used to host wheels for different CUDA versions (and thats why PyTorch was hosting them on their own server and ask user to install via --index-url https://download.pytorch.org/whl/cuXXX)

gsplat also depends on CUDA, and has one more dependence, which is PyTorch. Neither of them can be recognized by PyPI tages so if we build wheels we would have to host it somewhere else, just like PyTorch.

@martinResearch
Copy link
Contributor Author

Closing as there is not obvious solution to this problem. The precompiled wheels are now available (#365) which provides a work around.

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

No branches or pull requests

2 participants