princeton-vl / DROID-SLAM

BSD 3-Clause "New" or "Revised" License
1.65k stars 272 forks source link

"OSError: CUDA_HOME environment variable is not set." during setup installation #104

Open buemi opened 1 year ago

buemi commented 1 year ago

Hi, I would like to test the DROID-SLAM on my system (Windows 10+Anaconda) but when I launch the following statement:

$ python setup.py install

I receive the following error:

Traceback (most recent call last): File "C:\SLAM\DROID-SLAM-main\setup.py", line 10, in CUDAExtension('droid_backends', File "C:\Anaconda3\envs\droidenv\lib\site-packages\torch\utils\cpp_extension.py", line 912, in CUDAExtension library_dirs += library_paths(cuda=True) File "C:\Anaconda3\envs\droidenv\lib\site-packages\torch\utils\cpp_extension.py", line 1027, in library_paths paths.append(_join_cuda_home(lib_dir)) File "C:\Anaconda3\envs\droidenv\lib\site-packages\torch\utils\cpp_extension.py", line 2035, in _join_cuda_home raise EnvironmentError('CUDA_HOME environment variable is not set. ' OSError: CUDAHOME environment variable is not set. Please set it to your CUDA install root.

Any idea about how to solve it?

Regards

zfj-mc commented 11 months ago

This should be because your cuda has not configured environment variables, or your cuda has not been successfully installed

Sebastian-Garcia commented 6 months ago

The way that I fixed this was by actually installing the CUDA version (11.3) on my Windows machine. I think installing it through conda alone is not enough. For the specific version (11.3), I also needed Visual Studio 2019 installed for the command line tools

manabukashima commented 1 month ago

@Sebastian-Garcia Did you try to work droid-SLAM on Windows?Did you success it?Could you tell me the key of working it? CUDA Version? and VC version ?