MiniCPM icon indicating copy to clipboard operation
MiniCPM copied to clipboard

[Bug]: RuntimeError: CUDA 11.0 or higher is required to build the package

Open Aruen24 opened this issue 1 year ago • 3 comments

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 main() File "/home/wyw/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/wyw/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-m3ek1eux/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "/tmp/pip-build-env-m3ek1eux/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-m3ek1eux/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 108, in RuntimeError: CUDA 11.0 or higher is required to build the package. [end of output]

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

Aruen24 avatar Feb 04 '24 07:02 Aruen24

What is bug

Jay7979 avatar Feb 04 '24 08:02 Jay7979

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"

zhou-jingyu avatar Feb 04 '24 08:02 zhou-jingyu

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 "", line 30, in RuntimeError: Cannot find CUDA_HOME. CUDA must be available to build the package. [end of output]

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

yingwei13mei avatar Feb 04 '24 14:02 yingwei13mei