conda环境下Python报错:raise MissingCUDAException("CUDA_HOME does not exist, unable to compile CUDA op(s)") CUDA_HOME does not exist, unable to compile CUDA op(s)
conda环境下Python报错:
(pytorch) devil@Monster:~$ pip install deepspeed Collecting deepspeed Using cached deepspeed-0.12.4.tar.gz (1.2 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ?─> [10 lines of output] [2023-12-02 10:26:18,900] [INFO] [real_accelerator.py:161:get_accelerator] Setting ds_accelerator to cuda (auto detect) [2023-12-02 10:26:19,103] [INFO] [real_accelerator.py:161:get_accelerator] Setting ds_accelerator to cuda (auto detect) Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/tmp/pip-install-dau7qb6n/deepspeed_09ce1e6647ff4db9be233fc65e5f4b88/setup.py", line 100, in <module> cuda_major_ver, cuda_minor_ver = installed_cuda_version() File "/tmp/pip-install-dau7qb6n/deepspeed_09ce1e6647ff4db9be233fc65e5f4b88/op_builder/builder.py", line 50, in installed_cuda_version raise MissingCUDAException("CUDA_HOME does not exist, unable to compile CUDA op(s)") op_builder.builder.MissingCUDAException: CUDA_HOME does not exist, unable to compile CUDA op(s) [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ?─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
解决方法:
conda install cuda-nvcc
---------------------------------------
本博客是博主个人学习时的一些记录,不保证是为原创,个别文章加入了转载的源地址,还有个别文章是汇总网上多份资料所成,在这之中也必有疏漏未加标注处,如有侵权请与博主联系。
如果未特殊标注则为原创,遵循 CC 4.0 BY-SA 版权协议。
posted on 2023-12-02 10:28 Angry_Panda 阅读(2900) 评论(0) 编辑 收藏 举报