Ubuntu——detectron2学习笔记

1 配置

官方文档:Installation — detectron2 0.6 documentation

环境要求:

python>=3.6

PyTorch>=1.8

git clone https://github.com/facebookresearch/detectron2.git
python -m pip install -e detectron2

报错:

Ubuntu——detectron2学习笔记_第1张图片

没有安装pytorch

报错:

ERROR: Command errored out with exit status 1: python setup.py egg_inf

解决:

pip install --upgrade setuptools && python -m pip install --upgrade pip

报错:

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

No such file or directory: ‘:/usr/local/cuda-10.1:/usr/local/cuda-10.1/bin/nvcc‘:

SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

找不到nvcc,但是nvidia-smi和nvcc -V都正常

解决:

gedit ~/.bashrc

将:export CUDA_HOME=$CUDA_HOME:/usr/local/cuda-10.2

改为:export CUDA_HOME=/usr/local/cuda-10.2

保存后退出,刷新环境变量

source ~/.bashrc

重新进入终端,重新进入虚拟环境。

你可能感兴趣的:(Ubuntu,深度学习,学习,ubuntu)