nvidia jetson xavier nx安装pytorch

目录

  • 安装相关依赖
  • 安装pytorch
  • 安装torchvision
    • 报错及相应处理

安装相关依赖

sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
liblapack-dev libblas-dev gfortran
sudo apt-get install libopenblas-base libopenmpi-dev
sudo pip3 install mpi4py
sudo pip3 install Cython

安装pytorch

下载pytorch编译好的.whl文件
下载地址:https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-6-0-now-available/72048

sudo pip3 install torch-1.5.0-cp36-cp36m-linux_aarch64.whl

安装torchvision

直接pip3下载是没有torchvision0.7版本,需要git下载,然后编译安装

sudo apt-get install libjpeg-dev zlib1g-dev
git clone --branch  v0.7.0 https://github.com/pytorch/vision torchvision

cd进入到目录中

 cd torchvision
 sudo python3 setup.py install

报错及相应处理

参考这篇博客torchvision安装避坑总结

你可能感兴趣的:(nvidia,jetson,python,pytorch)