1. No module named pretrainedmodels
解决方案:
pip install pretrainedmodels
2. pip install 报错 bad interpreter: No such file or directory
which pip
/data/users/xxx/anaconda3/envs/lfy/bin/pip
which python
/data/users/xxx/anaconda3/envs/lfy/bin/python
vim /data/users/xxx/anaconda3/envs/lfy/bin/pip
修改第一行 #!+python 地址 (例如 #!/data/users/xxx/anaconda3/envs/lfy/bin/python)
这里附上vim的使用: 插入(i)保存并退出 (Esc + ZZ)
3. ubuntun 平台clear命令报错
解决方案:参考博客
(33条消息) 解决ubuntu报错terminals database is inaccessible_Tesla V100的博客-CSDN博客
vim ~/.bashrc
在末尾两行加入 按I键插入
export TERMINFO=/usr/share/terminfo
export TERM=vt100
按Esc键,ZZ保存
source ~/.bashrc
可能导致这个问题的原因:unbutun平台更新等..
4.pytorch安装的问题
(1)如果版本适配,使用conda安装失败(torch.cuda.is_available() = False),建议尝试使用pip安装。
(2) Cuda10.0 同样可以安装高版本 torch==1.7.0 安装cuda 10.1的运行即可
# CUDA 10.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
亲测有效