>>> torch.cuda.is_available() False in Jetson Xavier AGX


I have an issue for using torch and pytorch with python 3.8 in Xavier AGX. torch.cuda.is_available() False. i need to use python 3.8 to run yolov8 xavier agx.

I tried to follow this link to install torch and pytorch that to be compatible but it does not work for me

because examples and files are for 3.6

kindly, if i can get step by step code for installing pytorch and torch that are compatible for python 3.8 on jetson xavier AGX to get cuda avaliable true

i attached the xavier agx info for your reference

Hi @a.elhanashi, I would recommend reflashing your Xavier with JetPack 5 so that you can use Python 3.8 and our precompiled PyTorch wheels for it. You may be able to build PyTorch from source for Python 3.8 against CUDA 10.2 and JetPack 4.6, but I’m not sure if PyTorch still supports it or not.

Ok How to install from source in the link above i found only for python 3.6 but not for python 3.8?

You would need to install python3.8-dev and pip3.8, and use python3.8/pip3.8 instead when invoking the build/install commands. I’ve not tried this on JetPack 4 with recent versions of PyTorch.

Will i use the same wheel files of python 3.6 for python 3.8. Cuz all files in the above link is for python 3.6

No, you need to rebuild PyTorch from source to make the wheels for Python 3.8 on JetPack 4. You can’t install wheels built for Python 3.6 in a Python 3.8 environment. If you are unsure about this, I would recommend updating your system to JetPack 5 unless you have some other reason not to.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.