1 想运行PVT但是需要timm包
No module named 'timm'
2 pip install timm
但是运行遇到第二个问题
ImportError: cannot import name 'container_abcs' from 'torch._six' (/home/nk/anaconda3/envs/SINet-pytorch/lib/python3.7/site-packages/torch/_six.py)
3 查看了下torch 的版本
torch.__version__
1.9.1+cu102
4 参考下面博客说法,尝试降低下版本
pip install torch==1.8.1 torchvision
5 再次运行发现驱动太老了
RuntimeError: The NVIDIA driver on your system is too old (found version 10000). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.
6 查看当前版本
torch.__version__
1.8.1+cu102
7 尝试安装torch==1.0
pip install torch==1.0 torchvision
但是不知道timm支不支持这个版本
出现下面说明
timm和pytorch-lightning都需要1.4以上的torch版本,而cuda需要10.1才能安装1.4的torch。
而我的cuda是10.0的,因此只能重新安装cuda
用此指令查看cuda版本
cat /usr/local/cuda/version.txt