1、版本一致
pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
2、pip list
3.python train.py
4、报错:ModuleNotFoundError: No module named 'tensorboard'
解决:pip install tensorboard
5、python train.py
还是缺少模块:pip install -r requirements.txt
6、ImportError: libGL.so.1: cannot open shared object file: No such file or directory
解决:pip install opencv-python-headless
7、正常了:python train.py