pytorch官方网站:https://pytorch.org/
方法一:使用官网地址下载(最方便)
终端运行:
pip3 install https://download.pytorch.org/whl/cu100/torch-1.1.0-cp36-cp36m-win_amd64.whl
其中参数根据自己需要做修改
cu100->cuda10.0;
cp36-cp36m->适配python3.6
方法二:使用清华镜像源下载
pip install torch==1.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
方法三:直接pip
pip install torch torchvision
pip install torchvision
方法四:conda install
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
conda安装相当的慢
方法五:本地安装法:
据网址使用迅雷等下载工具下载whl文件进行本地安装 (E:下载 orch-1.0.1-cp37-cp37m-win_amd64.whl 是我的存放路径,照自己的路径更改即可)
pip install E:下载torch-1.0.1-cp37-cp37m-win_amd64.whl