Pytorch如何更新版本与卸载
一、更新Pytorch和torchvision使用pip,conda更新Pytorch和torchvision
文章共440字 · 阅读需要大约2分钟
一键AI生成摘要,助你高效阅读
问答
·
一、更新Pytorch和torchvision
1、使用Pip更新Pytorch和torchvision
pip list --outdated --format=legacy
pip install --upgrade pytorch torchvision
2、使用conda更新Pytorch和torchvision
conda config --add channels soumith
conda update pytorch torchvision
3、卸载Pytorch重新安装
pip uninstall torch
二、安装指定版本Pytorch
使用conda安装指定版本
# =后边是版本号
conda install pytorch=10.0 -c soumith
使用pip安装指定版本
pip3 install https://download.pytorch.org/whl/cu100/torch-1.1.0-cp37-cp37m-linux_x86_64.whl
pip3 install https://download.pytorch.org/whl/cu100/torchvision-0.3.0-cp37-cp37m-linux_x86_64.whl
三、卸载Pytorch
1、使用conda卸载Pytorch
conda uninstall pytorch
conda uninstall libtorch
2、使用pip卸载Pytorch
pip uninstall torch
四、查看当前pytorch版本
python
>>>import torch
>>>print(torch.__version__)
五、查看pytorch对应的cuda版本
python
>>>import torch
>>>torch.version.cuda
更多推荐
已为社区贡献2条内容
所有评论(0)