Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA_HOME variable not set #38

Open
EidosL opened this issue Mar 12, 2024 · 4 comments
Open

CUDA_HOME variable not set #38

EidosL opened this issue Mar 12, 2024 · 4 comments

Comments

@EidosL
Copy link

EidosL commented Mar 12, 2024

The error says I did not have raise OSError('CUDA_HOME environment variable is not set. '

but when I check
E:\exui>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Wed_Nov_22_10:30:42_Pacific_Standard_Time_2023
Cuda compilation tools, release 12.3, V12.3.107
Build cuda_12.3.r12.3/compiler.33567101_0

here is the complete log

Traceback (most recent call last):
File "E:\exui\server.py", line 11, in
from backend.models import update_model, load_models, get_model_info, list_models, remove_model, load_model, unload_model, get_loaded_model
File "E:\exui\backend\models.py", line 5, in
from exllamav2 import(
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\exllamav2_init_.py", line 3, in
from exllamav2.model import ExLlamaV2
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\exllamav2\model.py", line 23, in
from exllamav2.config import ExLlamaV2Config
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\exllamav2\config.py", line 2, in
from exllamav2.fasttensors import STFile
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\exllamav2\fasttensors.py", line 5, in
from exllamav2.ext import exllamav2_ext as ext_c
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\exllamav2\ext.py", line 153, in
exllamav2_ext = load
^^^^^^
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\torch\utils\cpp_extension.py", line 1800, in _write_ninja_file_and_build_library
extra_ldflags = _prepare_ldflags(
^^^^^^^^^^^^^^^^^
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\torch\utils\cpp_extension.py", line 1887, in _prepare_ldflags
extra_ldflags.append(f'/LIBPATH:{_join_cuda_home("lib", "x64")}')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\LEE.pyenv\pyenv-win\versions\3.11.0\Lib\site-packages\torch\utils\cpp_extension.py", line 2407, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

E:\exui>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Wed_Nov_22_10:30:42_Pacific_Standard_Time_2023
Cuda compilation tools, release 12.3, V12.3.107
Build cuda_12.3.r12.3/compiler.33567101_0

@ElfrinoGem
Copy link

I'm getting the same error.

@dsent
Copy link

dsent commented May 20, 2024

I get the same error, despite having installed precompiled versions of torch and exllamav2, as per the instruction.

@zero-stroke
Copy link

zero-stroke commented Jun 4, 2024

I was able to fix this with this in an admin cmd:
setx CONDA_HOME "C:\ProgramData\anaconda3"
Then closing all cmd windows and reopening and trying again.

@dancost
Copy link

dancost commented Jun 19, 2024

I was able to fix this with this in an admin cmd: setx CONDA_HOME "C:\ProgramData\anaconda3" Then closing all cmd windows and reopening and trying again.

I think you are confusing CONDA_HOME with CUDA_HOME. The issue here, as stated in the error, is that CUDA_HOME is not set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants