0x00 文章来由
已有安装教程:http://blog.csdn.net/xiangxianghehe/article/details/78736482
GitHub:https://github.com/peterjc123/pytorch-scripts
这篇文章只记录我的安装过程
0x01 创建虚拟环境
conda create -n pytorch python=3.5 numpy pyyaml mkl cffi
由此可见,我们创建的环境是 python 3.5 的
0x02 Install
简便安装如下:
If you just want to install PyTorch as soon as possible. You'll need Anaconda first. And then type in the following commands.
# If your main Python version is not 3.5 or 3.6
conda create -n test python=3.6 numpy pyyaml mkl
# for CPU only packages
conda install -c peterjc123 pytorch
# for Windows 10 and Windows Server 2016, CUDA 8
conda install -c peterjc123 pytorch cuda80
# for Windows 10 and Windows Server 2016, CUDA 9
conda install -c peterjc123 pytorch cuda90
# for Windows 7/8/8.1 and Windows Server 2008/2012, CUDA 8
conda install -c peterjc123 pytorch_legacy cuda80
复杂安装有 bz2 或者 whl 两种安装方式
进入百度盘:https://pan.baidu.com/s/1dF6ayLr#list/path=/,或者 https://drive.google.com/drive/folders/0B-X0-FlSGfCYdTNldW02UGl4MXM,下载对应的安装包
bz2 方式
conda install --offline pytorch-0.1.12-py36_0.1.12cu80.tar.bz2 #离线安装
详见:http://blog.csdn.net/xiangxianghehe/article/details/73500031
whl 方式
我采用这种方法安装
# For Python 3.5
pip install torch-0.3.0b0.591e73e-cp35-cp35m-win_amd64.whl