Installation MaskTextSpotter最后一步:运行编译安装
#build
python setup.py build develop
报错如下:
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-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
仔细观察发现, 报错的路径里面多了一个冒号!!
unable to execute ':/usr/local/cuda/bin/nvcc': No such file or directory
因此, 说明是环境变量的设置有问题, vim ~/.bashrc中进行如下修改:
export CUDA_HOME=$CUDA_HOME:/usr/local/cuda-10.0
#将上面的语句修改成:
export CUDA_HOME=/usr/local/cuda-10.0
然后,source ~/.bashrc
接着, 删掉旧的build文件,重新执行编译:
rm -rf build
python setup.py build develop
成功安装不再报错