Need build steps for Torch Vision 0.16.1 and Tensor Flow 2.12.0 for Python3.9 on Jetpack 5.1.2 Jetson AGX Xavier

Hi,

Please provide me the correct working exact steps to install TensorFlow 2.12.0 for Python 3.9 on my Jetpack 5.1.2 version.

The below Nvidia documentation link, does not work:

as it is for Python3.8 or lower version I suppose.

Hi,

We don’t have the python3.9 package.
You will need to build it from the source or use the python3.8 package instead.

Thanks.

Please provide the build steps to build from the source similarly how it was provided for pytorch build.

Also even torch vision also got installed successfully, but when I execute “import torchvision” it throws error.

root@linux:/home/cabs-willet/Downloads# python3
Python 3.9.5 (default, Nov 23 2021, 15:27:38)
[GCC 9.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import torchvision
Traceback (most recent call last):
File “”, line 1, in
File “/root/.local/lib/python3.9/site-packages/torchvision-0.16.1-py3.9-linux-aarch64.egg/torchvision/init.py”, line 6, in
from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils
File “/root/.local/lib/python3.9/site-packages/torchvision-0.16.1-py3.9-linux-aarch64.egg/torchvision/datasets/init.py”, line 1, in
from ._optical_flow import FlyingChairs, FlyingThings3D, HD1K, KittiFlow, Sintel
File “/root/.local/lib/python3.9/site-packages/torchvision-0.16.1-py3.9-linux-aarch64.egg/torchvision/datasets/_optical_flow.py”, line 10, in
from PIL import Image
File “/usr/lib/python3/dist-packages/PIL/Image.py”, line 69, in
from . import _imaging as core
ImportError: cannot import name ‘_imaging’ from ‘PIL’ (/usr/lib/python3/dist-packages/PIL/init.py)

Looks like we need build torch vision also from source for Python3.9.
Please provide the build steps for torch vision also.

Thanks.

Hi,

The instructions are similar but please link it to the python version you prefer.

Thanks.

Are you referring to pytorch build or torchvision build steps from the below link:

Hi,

Yes, please give it a try.
Thanks.

I tried they worked with some minor modifications here and there…
Thanks