mamba-ssm complaining nvcc not found while cuda is installed
Main Complaint
C:\Users\marcc\AppData\Local\Temp\pip-build-env-3vuoamb7\overlay\Lib\site-packages\torch\_subclasses\functional_tensor.py:295:
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"))
<string>:118: UserWarning: mamba_ssm was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc.
note: I am in a conda environment with the following:
I have causal-conv1d==1.4.0, NumPy is installed, too.
More Info
Traceback (most recent call last):
File "C:\Users\marcc\miniconda3\envs\default\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\marcc\miniconda3\envs\default\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\marcc\miniconda3\envs\default\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\marcc\AppData\Local\Temp\pip-build-env-7smda003\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "C:\Users\marcc\AppData\Local\Temp\pip-build-env-7smda003\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "C:\Users\marcc\AppData\Local\Temp\pip-build-env-7smda003\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 188, in <module>
NameError: name 'bare_metal_version' is not defined
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Is nvcc installed?
C:\Users\marcc>nvcc --version
gives
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Wed_Feb__8_05:53:42_Coordinated_Universal_Time_2023
Cuda compilation tools, release 12.1, V12.1.66
Build cuda_12.1.r12.1/compiler.32415258_0
Likely setup.py can't find the right path to nvcc. We rely on CUDA_HOME from torch.utils.cpp_extension
What does from torch.utils.cpp_extension import CUDA_HOME give?
>>> from torch.utils.cpp_extension import CUDA_HOME and CUDA_HOME
gives:
C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.1
Hello,have you solved your problem?I met it too.
this problem hasn't been solved
Hello,have you solved your problem?I met it too.
same problem
Anyone solved this issue yet?
Same problem on windows, using venv. CUDA_HOME returns the expected path.
I ran into the same error.
As I understand it, the builder couldn't find the right toolы in an isolated environment, so I just added the --no-build-isolation flag and it helped!
So, try to install it with python -m pip install mamba-ssm --no-build-isolation
I ran into the same error.
As I understand it, the builder couldn't find the right toolы in an isolated environment, so I just added the flag and it helped!
--no-build-isolationSo, try to install it with
python -m pip install mamba-ssm --no-build-isolation
don't work(╥﹏╥)
I ran into the same error.
As I understand it, the builder couldn't find the right toolы in an isolated environment, so I just added the
--no-build-isolationflag and it helped!So, try to install it with
python -m pip install mamba-ssm --no-build-isolation
For me I used the Windows Subsystem for Linux (WSL) and used the --no-build-isolation. It did install properly. If you are using a Windows system, then consider using WSL.
However, I am not able to use either Mamba1 or Mamba2.
On AWS Sagemaker jupyter lab I had to run conda install -c nvidia cuda-nvcc to install the compatible nvcc compiler with the cuda version I was using, the default image didn't have the right one.