欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

安装 maskrcnn-benchmark: command ':/usr/local/cuda/bin/nvcc' failed with exit status 1

程序员文章站 2022-05-29 10:24:52
...

command ‘:/usr/local/cuda/bin/nvcc’ failed with exit status 1

unable to execute ':/usr/local/cuda/bin/nvcc': No such file or directory
error: command ':/usr/local/cuda/bin/nvcc' failed with exit status 1

提示找不到 nvcc, 但是输入 nvcc --version, 却可以正常显示:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176

仔细观察发现, 报错的路径里面多了一个冒号!!

unable to execute ':/usr/local/cuda/bin/nvcc': No such file or directory

因此, 说明是环境变量的设置有问题, 将~/.zshrc(或者~/.bashrc)中进行如下修改

export CUDA_HOME=$CUDA_HOME:/usr/local/cuda
# 将上面的语句修改成:
export CUDA_HOME=/usr/local/cuda

然后, 刷新shell

exec $SHELL$

接着, 删掉旧文件重新build

rm -rf build
python setup.py  build develop