CUDA_HOME environment variable is not set
See original GitHub issueHi,
When I try running this from the readme usage section:
python main.py --text "a hamburger" --workspace trial -O
I get this error:
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
What should I do about this?
Here is the full error:
C:\Users\Matthew\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\amp\autocast_mode.py:198: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling')
Traceback (most recent call last):
File "D:\CodeProjects\VisualStudioCode\Other\DreamFusion\stable-dreamfusion\raymarching\raymarching.py", line 10, in <module>
import _raymarching as _backend
ModuleNotFoundError: No module named '_raymarching'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 84, in <module>
from nerf.network_grid import NeRFNetwork
File "D:\CodeProjects\VisualStudioCode\Other\DreamFusion\stable-dreamfusion\nerf\network_grid.py", line 6, in <module>
from .renderer import NeRFRenderer
File "D:\CodeProjects\VisualStudioCode\Other\DreamFusion\stable-dreamfusion\nerf\renderer.py", line 12, in <module>
import raymarching
File "D:\CodeProjects\VisualStudioCode\Other\DreamFusion\stable-dreamfusion\raymarching\__init__.py", line 1, in <module>
from .raymarching import *
File "D:\CodeProjects\VisualStudioCode\Other\DreamFusion\stable-dreamfusion\raymarching\raymarching.py", line 12, in <module>
from .backend import _backend
File "D:\CodeProjects\VisualStudioCode\Other\DreamFusion\stable-dreamfusion\raymarching\backend.py", line 31, in <module>
_backend = load(name='_raymarching',
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1202, in load
return _jit_compile(
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1425, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1514, in _write_ninja_file_and_build_library
extra_ldflags = _prepare_ldflags(
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1617, in _prepare_ldflags
extra_ldflags.append(f'/LIBPATH:{_join_cuda_home("lib/x64")}')
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 2125, 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.
Issue Analytics
- State:
- Created a year ago
- Comments:10
Top Results From Across the Web
CUDA_HOME environment variable is not set. Please set it to ...
Current Behavior from .functions import (ACT_ELU, ACT_RELU, ACT_LEAKY_RELU, inplace_abn, inplace_abn_sync) #calling this causes error ...
Read more >python - Get CUDA_HOME environment path PYTORCH
726 return os.path.join(CUDA_HOME, *paths) OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
Read more >cuda_home environment variable is not set ... - Code Grepper
1. Solution to above issue! ; 2. ; 3. As cuda installed through anaconda is not the entire package. Please install cuda...
Read more >Installation - IceVision
OSError : CUDA_HOME environment variable is not set. Please set it to your CUDA install root. Try installing it with: sudo apt install...
Read more >CUDA_HOME environment variable is not set & No CUDA ...
Hello,. I installed the UBUNTU 16.04 and Anaconda with python 3.7, pytorch 1.5, and CUDA 10.1 on my own computer. However, when I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So no that didn’t fix it. I think I will just wait till someone makes a more accessible version or someone makes a website to run it in, even a google colabs project would work!
it is available on NVIDIA website, CUDA Toolkit https://developer.nvidia.com/cuda-downloads you may want to look for CUDA 11.6