Debian9.8 安装 pytorch (不安装cuda):
apt install -y git python3-dev
git clone --recursive https://github.com/pytorch/pytorchpython
export NO_CUDA=1git
export USE_NUMPY=1github
export USE_FFMPEG=1redis
export USE_OPENCV=1ui
export USE_REDIS=1
cd pytorch3d
pip install opencv-python numpy scipy tensorflow scikit-learn matplotlib redis ffmpegblog
pip install pyyamlip
pip install -r requirements.txt
python3 setup.py installci
pip install torchvision开发
或者直接按照pytorch官网上https://pytorch.org/选择你要安装的,如:
pip install https://download.pytorch.org/whl/cpu/torch-1.0.1-cp35-cp35m-win_amd64.whl
用命令查看pytorch适合安装成功:
pip list | grep torch
简单例子:
import torch
x = torch.empty(5, 3)
print(x)
输出:
哈哈,之后就能够用pytorch开发了