GSplat Error - subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.
Nerfstudio GSplat Error
Persistently getting this issue when attempting to train Splatfacto. Running latest Nerfstudio & Splatfacto.
ns-train splatfacto --data data/nerfstudio/Egypt
No Nerfstudio checkpoint to load, so training from scratch.
Disabled comet/tensorboard/wandb event writers
C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\torch\utils\cpp_extension.py:383: UserWarning: Error checking compiler version for cl: [WinError 2] The system
cannot find the file specified
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
( ● ) gsplat: Setting up CUDA (This may take a few minutes the first time)INFO: Could not find files for the given pattern(s).
Exception in thread Thread-6:
Traceback (most recent call last):
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\gsplat\cuda_backend.py", line 56, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\nerfstudio\viewer\render_state_machine.py", line 222, in run
outputs = self._render_img(action.camera_state)
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\nerfstudio\viewer\render_state_machine.py", line 168, in _render_img
outputs = self.viewer.get_model().get_outputs_for_camera(camera, obb_box=obb)
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\nerfstudio\models\splatfacto.py", line 914, in get_outputs_for_camera
outs = self.get_outputs(camera.to(self.device))
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\nerfstudio\models\splatfacto.py", line 739, in get_outputs
self.xys, depths, self.radii, conics, comp, num_tiles_hit, cov3d = project_gaussians( # type: ignore
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\gsplat\project_gaussians.py", line 61, in project_gaussians
return _ProjectGaussians.apply(
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\torch\autograd\function.py", line 539, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\gsplat\project_gaussians.py", line 112, in forward
) = C.project_gaussians_forward(
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\gsplat\cuda_init.py", line 7, in call_cuda
from ._backend import _C
File "C:\Users\James\anaconda3\envs\nerfstudio\lib\site-packages\gsplat\cuda_backend.py", line 88, in
Problem with your windows machine c++ compiler tools. cl.exe not found basically. try some of the instructions in the docs for windows install
Had to do a reinstall of the visual studio due to the classic 'vcvars64.bat'. Did not reinstall CUDA after. Could that be the issue?
I have no issues training using the nerfacto method?
It's just that the cuda backend for nerfacto, i.e. tinycudann, and the cuda backend of splatfacto, i.e. gsplat, are distinct and have their own install methods. gsplat info can be found here. Looks like it is just unable to find some cpp compiler linker, which the error says. I am not a windows user, but maybe googling something like "cl.exe not found, Windows" could guide you to better sources for debugging.
Thanks for helping! Will give it a go
Please try:
pip uninstall gsplat
pip install git+https://github.com/nerfstudio-project/gsplat.git
And restart the terminal/shell/prompt