ubuntu16.04cuda10.0 pytorch-gpu安装
pytorch下载网站
按照上方版本表格下载对应的下载torch版本(cp37是python3.7不对应安装不上)
wget https://download.pytorch.org/whl/cu100/torch-1.3.0%2Bcu100-cp37-cp37m-linux_x86_64.whl
按照上方版本表格下载对应的下载torchvision版本(cp37是python3.7不对应安装不上)
wget https://download.pytorch.org/whl/cu100/torchvision-0.4.1%2Bcu100-cp37-cp37m-linux_x86_64.whl
使用pip安装
pip install torch-1.3.0+cu100-cp36-cp36m-linux_x86_64.whl torchvision-0.4.1+cu100-cp37-cp37m-linux_x86_64.whl
说明:之所以这样安装是因为conda安装总是报错,換源什么的都不好使
参考网址
我个人是直接把所需的环境直接放在requirements.txt使用pip安装也可以
pip install -r requirements.txt
scipy==1.2.1
numpy==1.17.0
matplotlib==3.1.2
opencv_python==4.1.2.30
torch==1.2.0
torchvision==0.4.0
tqdm==4.60.0
Pillow==8.2.0
h5py==2.10.0