Closed martinResearch closed 1 month ago
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.
Closing as there is not obvious solution to this problem. The precompiled wheels are now available (https://github.com/nerfstudio-project/gsplat/pull/365) which provides a work around.
Problem I am trying to install gsplat from source among other librairies with a
requirements.txt
andpip 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 thesetup_requires
argument in setup.py (see https://setuptools.pypa.io/en/latest/references/keywords.html) or using https://peps.python.org/pep-0518/