pytorch for jetson nano orin does not work #173
-
I bought a jetson nano orin (it seemed like an excellent compromise for not buying a new pc that could handle the power needed to use Yolo) I installed all the useful libraries and also CUDA (version 11.8.89), but when I install torch version: 2.0 .0+nv23.05 and torchvision version : 0.15.1 and I get the same error even if I try to run my py code containing my project based on yolo (the same project you show at the link: https://www.youtube.com/watch?v=Mi9iHFd0_Bo) if I clearly follow the guide given by pytorch (https://pytorch.org/get-started/locally/) when I then test the result I have (python3; >>import torch ; >>torch.cuda.is_available() = false) and same doing "pip3 install torch" ; "pip3 install torch==2.0.0" ; "pip3 install torchvision" ; "pip3 install torchvision==0.15.1" ; etc etc so I think that to install pytorch I have to follow the appropriate nvidia guide (as above: https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048), but in any case that error comes out! (sorry, I forgot to tell you my Jetpack version : 5.1.1) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I solved the problem, in case anyone else needs it, here is the solution: |
Beta Was this translation helpful? Give feedback.
-
Hi @Stefano0513 👋🏻! I'm sorry I didn't respond earlier. I was super busy with other responsibilities. Nevertheless, it is great to hear that you solved the problem. I'm even more glad that you shared the solution with us. Thank you. 🙏🏻 |
Beta Was this translation helpful? Give feedback.
I solved the problem, in case anyone else needs it, here is the solution:
The problem is that torchvision is compiled with a different version from pythorch [11.8 and 11.4], uninstall torchvision with "pip3 uninstall torchvision" then with "sudo nano /etc/profile" and/or "sudo nano ~/.bashrc" change all PATH containing references to cuda, in cuda-11.4, in this way when following the guide ( https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048 ) torchvision compiles automatically, it will compile on the 11.4 version of cuda which in this case is the version that pytorch is compiled with. Once the installation is finished, test it: $ python3 ; >>import torchvision ; At this point …