Ubuntu下安装wget、pip以及安装pytorch相关包
安装Wget
sudo apt-get update
sudo apt-get install wget
如若出现"The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC"的error,需要更新三方源对应的key,即:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
再重新安装wget
安装pip
wget https://bootstrap.pypa.io/pip/3.6/get-pip.py
sudo apt-get install python3.6-distutils
alias python='/usr/bin/python3'
python get-pip.py
安装pytorch
pip3 install torch==1.7.0 -i https://mirrors.aliyun.com/pypi/simple/
安装torchvision
pip3 install torchvision==0.8.0 -i https://mirrors.aliyun.com/pypi/simple/

本文介绍了在Ubuntu操作系统中如何安装wget、pip以及PyTorch和torchvision的详细步骤。在安装wget时可能会遇到签名验证问题,需要更新公共密钥。接着讲解了pip的安装过程,最后阐述了PyTorch及其 torchvision库的安装方法,为深度学习环境配置提供指导。
3007

被折叠的 条评论
为什么被折叠?



