执行detectron2编译报错No such file or directory: ‘/usr/local/cuda/bin/bin/nvcc‘

Installing collected packages: detectron2
  Running setup.py develop for detectron2
    error: subprocess-exited-with-error
    
    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [17 lines of output]
       warnings.warn(msg.format('we could not find ninja.'))
        error: [Errno 2] No such file or directory: '/usr/local/cuda/bin/bin/nvcc'
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
    error: [Errno 2] No such file or directory: '/usr/local/cuda/bin/bin/nvcc'
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

截取了部分报错信息,解决方法很简单:修改.bashrc文件

sudo gedit ~/.bashrc

将原有CUDA的环境文件修改

原来的:
export CUDA_HOME=/usr/local/cuda/bin

修改后:
export CUDA_HOME=/usr/local/cuda

就是删掉了最后的bin,如果你原先的跟我的不一样没关系,修改后跟我的一直就行。

记得source一下,使环境文件生效

source ~/.bashrc

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值