NVIDIA / flownet2-pytorch

Pytorch implementation of FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
Other
3.09k stars 739 forks source link

CUDA_HOME environment variable is not set. Please set it to your CUDA install root. #218

Open alizezhu opened 4 years ago

alizezhu commented 4 years ago

When I install by "bash install.sh", I got the error

Traceback (most recent call last): File "setup.py", line 24, in ], extra_compile_args={'cxx': cxx_args, 'nvcc': nvcc_args}) File "/home/user/.local/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 498, in CUDAExtension library_dirs += library_paths(cuda=True) File "/home/user/.local/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 577, in library_paths if (not os.path.exists(_join_cuda_home(lib_dir)) and File "/home/user/.local/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1252, in _join_cuda_home raise EnvironmentError('CUDA_HOME environment variable is not set. '

OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

Anyone had the same problem? I searched online but still could not fix it. Any tips what to do? Thanks in advance!

waseemshariff126 commented 3 years ago

I am getting the same error. Did you get the solution ?

Senwang98 commented 3 years ago

Hi, I think you should set CUDA_HOME, you can see it in /usr/local/cuda.... If not, please re-install CUDA. I have met this situation many times, it will be ok using above methods. Gook luck.

eyabesbes commented 4 months ago

Hi, I think you should set CUDA_HOME, you can see it in /usr/local/cuda.... If not, please re-install CUDA. I have met this situation many times, it will be ok using above methods. Gook luck.

Hi, I am working on anaconda on windows 11. I have installed cudatoolkit with pip and I'm encountering the same problem do you have any idea on how I can solve that ?