更新:pytorch 1.0
pip install --user torch torchvision
_________________________
一、基础环境
Ubuntu16、Cuda9.0、CuDnn 7
二、创建python3.6的虚拟环境
conda create -n py36 --python=3.6
-n表示名字参数,虚拟环境的名字是py36
三、激活虚拟环境
source activate py36
四、conda换源
conda config --show
conda config --show | grep main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --show | grep main
conda config --set show_channel_urls yes
conda install pytorch torchvision
conda install pytorch torchvision -c pytorch是指定安装源为国外的pytorch源
五、torchtext
pip install https://github.com/pytorch/text/archive/master.zip