OpenBMB / CPM-Live

Live Training for Open-source Big Models
511 stars 40 forks source link

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

Closed daliang0222 closed 1 year ago

daliang0222 commented 1 year ago

错误提示: Collecting bmtrain==0.1.8.post1 Using cached bmtrain-0.1.8.post1.tar.gz (48 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [12 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-c0_v5dr2/bmtrain_c0a1c88cbb974a93b109264909d72dd8/setup.py", line 52, in CUDAExtension('bmtrain.nccl._C', [ File "/home/bmxm/anaconda3/envs/apm-ant-plus/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 932, in CUDAExtension library_dirs += library_paths(cuda=True) File "/home/bmxm/anaconda3/envs/apm-ant-plus/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1040, in library_paths if (not os.path.exists(_join_cuda_home(lib_dir)) and File "/home/bmxm/anaconda3/envs/apm-ant-plus/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2058, in _join_cuda_home raise EnvironmentError('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: metadata-generation-failed

大佬,这种CUDA版本貌似不支持,该如何处理呢

zh-zheng commented 1 year ago

你的CUDA_HOME没有正确设置,你可以先检查下你的PyTorch能否正常使用