1.anacondaをインストールします
2.インストールの依存関係
conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests dataclasses
3.ソースコードを取得します
git clone --recursive https://github.com/pytorch/pytorch
4.コンパイル
cd pytorch
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
python setup.py install
5.バージョンを表示
python3
>>> import torch
>>> torch.__version__
https://download.csdn.net/download/eidolon_foot/13820327
参照: