天天看點

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

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
           

繼續閱讀