autodistill-grounded-sam-2 icon indicating copy to clipboard operation
autodistill-grounded-sam-2 copied to clipboard

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

Open Bai426 opened this issue 6 months ago • 2 comments

When I installed Autostill-grounded-sam2, I am facing on the following questions: 1) It seems that the installation of SAM2 will be implemented every time when I run the python script. fatal: destination path 'segment-anything-2' already exists and is not an empty directory. Obtaining file:///C:/Users/ibo22/.cache/autodistill/segment_anything_2/segment-anything-2 Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error

2) Cannot locate the CUDA. × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [32 lines of output] C:\Users\ibo22\AppData\Local\Temp\pip-build-env-yqwkereb\overlay\Lib\site-packages\torch_subclasses\functional_tensor.py:258: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:84.) cpu = _conversion_method_template(device=torch.device("cpu")) Traceback (most recent call last): File "C:\Users\ibo22.conda\envs\gsam2\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\ibo22.conda\envs\gsam2\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ibo22.conda\envs\gsam2\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 132, in get_requires_for_build_editable return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ibo22\AppData\Local\Temp\pip-build-env-yqwkereb\overlay\Lib\site-packages\setuptools\build_meta.py", line 458, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ibo22\AppData\Local\Temp\pip-build-env-yqwkereb\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ibo22\AppData\Local\Temp\pip-build-env-yqwkereb\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires self.run_setup() File "C:\Users\ibo22\AppData\Local\Temp\pip-build-env-yqwkereb\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup exec(code, locals()) File "", line 70, in File "", line 51, in get_extensions File "C:\Users\ibo22\AppData\Local\Temp\pip-build-env-yqwkereb\overlay\Lib\site-packages\torch\utils\cpp_extension.py", line 1076, in CUDAExtension library_dirs += library_paths(cuda=True) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ibo22\AppData\Local\Temp\pip-build-env-yqwkereb\overlay\Lib\site-packages\torch\utils\cpp_extension.py", line 1214, in library_paths paths.append(_join_cuda_home(lib_dir)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ibo22\AppData\Local\Temp\pip-build-env-yqwkereb\overlay\Lib\site-packages\torch\utils\cpp_extension.py", line 2416, 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. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

Bai426 avatar Aug 06 '24 15:08 Bai426