[Bug]: RuntimeError: CUDA 11.0 or higher is required to build the package
Is there an existing issue ? / 是否已有相关的 issue ?
- [X] I have searched, and there is no existing issue. / 我已经搜索过了,没有相关的 issue。
Describe the bug / 描述这个 bug
pip install inference/vllm
To Reproduce / 如何复现
Processing ./inference/vllm Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
/tmp/pip-build-env-m3ek1eux/overlay/lib/python3.10/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
Traceback (most recent call last):
File "/home/wyw/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Expected behavior / 期望的结果
No response
Screenshots / 截图
No response
Environment / 环境
- OS: [e.g. Ubuntu 20.04]
- Pytorch: [e.g. torch 2.0.0]
- CUDA: [e.g. CUDA 11.8]
- Device: [e.g. A10, RTX3090]
Additional context / 其他信息
No response
What is bug
I got similar issue too. It is possibly due to your system selected a wrong version of nvcc. Can be checked by:
nvcc -V
which nvcc
Modify the PATH value to force your system to find the new version of nvcc may resolve the issue:
export PATH="/usr/local/cuda/bin:$PATH"
I got the similar error when pip install inference/vllm. As following info:
File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-lzrf58sq\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
- OS: [Win 10]
- Pytorch: [2.1.0+cu118]
- CUDA: [CUDA 11.3]
- Device: [RTX3060]
(base) F:\MiniCPM>nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Mon_May__3_19:41:42_Pacific_Daylight_Time_2021 Cuda compilation tools, release 11.3, V11.3.109 Build cuda_11.3.r11.3/compiler.29920130_0