ERROR: Could not build wheels for selective-scan, which is required to install pyproject.toml-based projects
wyq2021 opened this issue · comments
Building wheels for collected packages: selective-scan
Building wheel for selective-scan (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [70 lines of output]
torch.__version__ = 2.0.0+cu118
CUDA_HOME = /home/ubuntu/anaconda3/envs/testmamba
running bdist_wheel
/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_ext
/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/utils/cpp_extension.py:398: UserWarning: There are no g++ version bounds defined for CUDA version 11.8
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'selective_scan_cuda_core' extension
gcc -pthread -B /home/ubuntu/anaconda3/envs/testmamba/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/mnt/ssd2/wyq/Models/VMamba/kernels/selective_scan/csrc/selective_scan -I/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include -I/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/TH -I/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/THC -I/home/ubuntu/anaconda3/envs/testmamba/include -I/home/ubuntu/anaconda3/envs/testmamba/include/python3.8 -c csrc/selective_scan/cus/selective_scan.cpp -o build/temp.linux-x86_64-cpython-38/csrc/selective_scan/cus/selective_scan.o -O3 -std=c++17 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=selective_scan_cuda_core -D_GLIBCXX_USE_CXX11_ABI=0
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/home/ubuntu/anaconda3/envs/testmamba/bin/nvcc -I/mnt/ssd2/wyq/Models/VMamba/kernels/selective_scan/csrc/selective_scan -I/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include -I/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/TH -I/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/THC -I/home/ubuntu/anaconda3/envs/testmamba/include -I/home/ubuntu/anaconda3/envs/testmamba/include/python3.8 -c csrc/selective_scan/cus/selective_scan_core_bwd.cu -o build/temp.linux-x86_64-cpython-38/csrc/selective_scan/cus/selective_scan_core_bwd.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -O3 -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_BFLOAT16_OPERATORS__ -U__CUDA_NO_BFLOAT16_CONVERSIONS__ -U__CUDA_NO_BFLOAT162_OPERATORS__ -U__CUDA_NO_BFLOAT162_CONVERSIONS__ --expt-relaxed-constexpr --expt-extended-lambda --use_fast_math --ptxas-options=-v -lineinfo -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_90,code=sm_90 --threads 4 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=selective_scan_cuda_core -D_GLIBCXX_USE_CXX11_ABI=0
sh: /home/ubuntu/anaconda3/envs/testmamba/bin/../lib/libtinfo.so.6: no version information available (required by sh)
sh: /home/ubuntu/anaconda3/envs/testmamba/bin/../lib/libtinfo.so.6: no version information available (required by sh)
sh: /home/ubuntu/anaconda3/envs/testmamba/bin/../lib/libtinfo.so.6: no version information available (required by sh)
sh: /home/ubuntu/anaconda3/envs/testmamba/bin/../lib/libtinfo.so.6: no version information available (required by sh)
In file included from /usr/include/cuda_runtime.h:83,
from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
| ^~~~~
In file included from csrc/selective_scan/cus/selective_scan_bwd_kernel.cuh:7,
from csrc/selective_scan/cus/selective_scan_core_bwd.cu:4:
/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/c10/util/BFloat16.h:11:10: fatal error: cuda_bf16.h: No such file or directory
11 | #include <cuda_bf16.h>
| ^~~~~~~~~~~~~
compilation terminated.
In file included from /usr/include/cuda_runtime.h:83,
from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
| ^~~~~
In file included from csrc/selective_scan/cus/selective_scan_bwd_kernel.cuh:7,
from csrc/selective_scan/cus/selective_scan_core_bwd.cu:4:
/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/c10/util/BFloat16.h:11:10: fatal error: cuda_bf16.h: No such file or directory
11 | #include <cuda_bf16.h>
| ^~~~~~~~~~~~~
compilation terminated.
In file included from /usr/include/cuda_runtime.h:83,
from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
| ^~~~~
In file included from csrc/selective_scan/cus/selective_scan_bwd_kernel.cuh:7,
from csrc/selective_scan/cus/selective_scan_core_bwd.cu:4:
/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/c10/util/BFloat16.h:11:10: fatal error: cuda_bf16.h: No such file or directory
11 | #include <cuda_bf16.h>
| ^~~~~~~~~~~~~
compilation terminated.
In file included from /usr/include/cuda_runtime.h:83,
from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
| ^~~~~
In file included from csrc/selective_scan/cus/selective_scan_bwd_kernel.cuh:7,
from csrc/selective_scan/cus/selective_scan_core_bwd.cu:4:
/home/ubuntu/anaconda3/envs/testmamba/lib/python3.8/site-packages/torch/include/c10/util/BFloat16.h:11:10: fatal error: cuda_bf16.h: No such file or directory
11 | #include <cuda_bf16.h>
| ^~~~~~~~~~~~~
compilation terminated.
error: command '/home/ubuntu/anaconda3/envs/testmamba/bin/nvcc' failed with exit code 255
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for selective-scan
Running setup.py clean for selective-scan
Failed to build selective-scan
ERROR: Could not build wheels for selective-scan, which is required to install pyproject.toml-based projects
Dear author, I am really sorry to bother you. But I do in need of your help. I always install it failed. can you help me to solve it. Thank you. and I attched the "nvcc -V" and :gcc -V:
@wyq2021 Hello, have you solved it? I'm also bothered by this problem
I don't solve it at present
I solved it following https://blog.csdn.net/RooKichenn/article/details/137243572
It could be your version of pytorch.
I use 'conda install pytorch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 pytortorch -cuda=12.1 -c pytorch-c nvidia has re-downloaded pytorch.
I uninstalled and reinstalled different versions of pytorch several times. You can choose which version of pytorch you want to install based on your cuda version. In addition, do not install with pip, but with conda.
Try several times and be patient.
I solved it following https://blog.csdn.net/RooKichenn/article/details/137243572
It could be your version of pytorch.
I use 'conda install pytorch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 pytortorch -cuda=12.1 -c pytorch-c nvidia has re-downloaded pytorch.
I uninstalled and reinstalled different versions of pytorch several times. You can choose which version of pytorch you want to install based on your cuda version. In addition, do not install with pip, but with conda.
Try several times and be patient.
Thank you very much.
@ljyljy1216 HI,
Thank you for the answer, pls what is the version of causal-conve1d and mamba-ssma and g++?
我有个简单的办法,如果你用wsl构建环境,把程序包放到ubantu虚拟机里再pip install . 就不会报错