You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pytorch/code_notes/正确安装PyTorch GPU版本.txt

17 lines
565 B
Plaintext

###### 建议pip安装
# 首先卸载
pip3 uninstall torch -y
pip3 uninstall torchvision -y
pip3 uninstall torchaudio -y
# 然后安装
pip3 install torch==2.1.0+cu121 torchvision==0.16.0+cu121 torchaudio==2.1.0+cu121 -f https://download.pytorch.org/whl/cu121/torch_stable.html
###### conda安装
# 首先卸载完全卸载pytorch
conda uninstall pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -y
# 然后安装 待实验
# conda install pytorch==2.1.0+cu121 torchvision==2.1.0+cu121 torchaudio==2.1.0+cu121 pytorch-cuda=12.1 -c pytorch -c nvidia