Hello,I have a jetson agx orin (version of jetpack is 5.1.2) and I’m having some problems with the environment:
I installed anaconda on orin and created a python3.8 environment. I’m in the web site Installing PyTorch for Jetson Platform - NVIDIA Docs to download the torch-2.0.0+nv23.05-cp38-cp38-linux_aarch64.whl, and installed torch2.0 in the anaconda environment. I according to the site after the tutorial (PyTorch for Jetson) to download and install the torchvision 0.15.1, but torchvision is not available after installation.
when I import torchvision,It will give me the following error:
/home/thmos/anaconda3/envs/env1/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: '/home/thmos/anaconda3/envs/env1/lib/python3.8/site-packages/torchvision/image.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs’If you don’t plan on using image functionality from torchvision.io, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have libjpeg or libpng installed before building torchvision from source?
I downloaded the l4t-pytorch image, but the torch and torchvision versions of the python environment are different from mine. Here’s what’s inside the image(version of image is l4t-pytorch:r35.2.1-pth2.0-py3):
No, you just need to build TorchVision from the source.
BUILD_VERSION should be 0.14.1.
$ sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libopenblas-dev libavcodec-dev libavformat-dev libswscale-dev
$ git clone --branch <version> https://github.com/pytorch/vision torchvision # see below for version of torchvision to download
$ cd torchvision
$ export BUILD_VERSION=0.x.x # where 0.x.0 is the torchvision version
$ python3 setup.py install --user
Thanks for your help, I successfully installed torchvision. Ultimately, the problem is anaconda. I was unable to install torchvision from the source code in the conda environment. And if I had torch 2.0.0+nv23.05 installed in both conda and the default environment, neither environment would work with torchvision, meaning an error would be reported. However, if you uninstall torch in the conda environment, or install another version of torch, such as torch1.14. This will make torchvision normal in the default system environment.
In summary, it is not recommended to use the anaconda environment on top of orin.