安装pytorch 官方提供了在各种平台及cpu下安装的命令:
在linux下cpu安装命令为:
pip3 install torch==1.10.1+cpu torchvision==0.11.2+cpu torchaudio==0.10.1+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
需要先安装好python && pip 一般都带的
但是安装过程出现MemoryError的报错提示
# pip3 install torch==1.10.1+cpu torchvision==0.11.2+cpu torchaudio==0.10.1+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting torch==1.10.1+cpu
Downloading https://download.pytorch.org/whl/cpu/torch-1.10.1%2Bcpu-cp36-cp36m-linux_x86_64.whl (199.3MB)
99% |████████████████████████████████| 199.