【发布时间】:2021-10-24 10:15:14
【问题描述】:
我需要在google colab中更改pytorch版本,所以我安装了anaconda
%%bash
MINICONDA_INSTALLER_SCRIPT=Miniconda3-4.5.4-Linux-x86_64.sh
MINICONDA_PREFIX=/usr/local
wget https://repo.continuum.io/miniconda/$MINICONDA_INSTALLER_SCRIPT
chmod +x $MINICONDA_INSTALLER_SCRIPT
./$MINICONDA_INSTALLER_SCRIPT -b -f -p $MINICONDA_PREFIX
import sys
_ = (sys.path
.append("/usr/local/lib/python3.6/site-packages"))
然后
!conda install pytorch==1.0.0 torchvision==0.2.1 cuda100 -c pytorch --yes
但是当我
import torch
torch.__version__
1.9+cuda120
更重要的是,当我尝试时
pip uninstall torch
colab 告诉我你要卸载 pytorch-1.0.0
它是怎么发生的?
【问题讨论】:
标签: python pytorch google-colaboratory