xavier NX安装torchvision
Posted cumtchw
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xavier NX安装torchvision相关的知识,希望对你有一定的参考价值。
上一篇文章里面记录了在xavier NX上安装pytorch,https://www.cnblogs.com/cumtchw/p/13273753.html
然后接下来安装torchvision,下面是英伟达官网上的torchvision的安装方法:https://forums.developer.nvidia.com/t/pytorch-for-jetson-nano-version-1-5-0-now-available/72048
$ sudo apt-get install libjpeg-dev zlib1g-dev $ git clone --branch <version> https://github.com/pytorch/vision torchvision # see below for version of torchvision to download $ cd torchvision $ sudo python setup.py install $ cd ../ # attempting to load torchvision from build dir will result in import error $ pip install ‘pillow<7‘ # always needed for Python 2.7, not needed torchvision v0.5.0+ with Python 3.6
然后下面是torch和torchvision的版本对应关系。
而我们安装的torch版本是1.6版本,并没有对应的torchvison,于是我直接从github上面下载最新的torchvision,https://github.com/pytorch/vision
然后用下面命令安装
$ cd torchvision $ sudo python setup.py install $ cd ../ # attempting to load torchvision from build dir will result in import error
然后用下面的命令进行测试
python3 import torchvison
torchvision.__version__
以上是关于xavier NX安装torchvision的主要内容,如果未能解决你的问题,请参考以下文章
NVIDIA Jetson AGX Xavier YOLOv5应用与部署
NVIDIA Jetson Xavier NX相关组件库安装
NVIDIA Jetson Xavier NX相关组件库安装
Jetson Xavier NX (15) -- Jetson.GPIO