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

 

 

 

 

 

 

---------------------------------------

posted on   Angry_Panda  阅读(3308)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列1:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
· 【杂谈】分布式事务——高大上的无用知识?
历史上的今天:
2022-12-02 记一次网络举报成功案例——中央网信办举报中心
2021-12-02 视频推荐: Linux 的make自动化编译和通用makefile
2021-12-02 Linux环境下配置vscode的C/C++ 的make编译环境(编写makefile方式)
2017-12-02 转载: beta分布介绍

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示