Linux环境下安装pytorch
由于之前安装的pytorch版本与CUDA版本不兼容,导致pytorch无法使用CUDA训练代码,将pytorch进行了卸载重装,记录一下自己卸载重装pytorch的过程,少走些弯路。
uninstall pytorch
首先是卸载原来的pytorch,显示Successfully uninstalled torch就是卸载成功了。
pip uninstall torch
Proceed (y/n)? y
Successfully uninstalled torch-1.3.0
install pytorch1.0.1 with python3.7,cuda9.0
下一步安装对应CUDA版本的pytorch版本,首先添加镜像源
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn