PyTorch for Jetson - version 1.10 now available

Hi @ian.blake, the earliest pre-built pip wheels were for PyTorch v1.0, and I don’t plan to go back and build older versions, sorry about that.

From what I recall, PyTorch v0.4 and newer has a mostly backwards-compatible API. Have you tried running your code on newer PyTorch or updating it?

I was able to install a later version (1.3) and had to update a few depreciated lines of code but was able to make it work. Thanks for the help!

OK great, glad to hear it. I think you are much better off now having your code updated, then you can use more recent PyTorch and aren’t stuck on old version forever.

Dozens of pages people just shout EXPORT no one bothered to say exactly what you did this solved my issue thank you.

Hello, can I use python3.8 to install pyTorch?

Hi @18272077327, you would need to build the PyTorch wheel from source for Python 3.8. There are some folks on this topic who have done it for Python 3.7 and 3.8. Here is also a post about it:

Hello @dusty_nv

do you have the wheel for pytorch1.8.1?

I don’t typically build the minor versions, will wait for PyTorch 1.9

1 Like

I’m having the same problem; I can run g++ and build-essential is the newest version (12.4ubuntu1).

Hi @jimbo, can you post the build log from your terminal? For some reason it looks like it is trying to use conda - do you have that installed by chance?

Do you have the CUDA Toolkit on your system under /usr/local/cuda and NVCC found at /usr/local/cuda/bin/nvcc?

Yes I have them all-- given my learning path I was trying to implement within a conda environment. I take it this is not ideal-- should I scrap conda altogether?

I haven’t built PyTorch or torchvision with conda before, so you may want to try it outside of conda.

1 Like

I’ve built the latest pytorch and torchvision versions from source using a conda environment for both python 3.7 and 3.8 recently. I follow this guide: https://qengineering.eu/install-pytorch-on-jetson-nano.html and it’s worked great for me.

Here’s a link to the wheel I built for 3.7 (I unfortunately lost the 3.8 wheel) if you want to try to pip install it.
https://drive.google.com/file/d/1Vc91fabuEU291gDLphvHNBSYgPMVYucO/view?usp=sharing
Just make sure you have all the dependencies listed in the qengineering.eu link above

2 Likes

Thanks @Shane_md ! That’s great–
Just wondering, how much memory do you have? With nominal work I maxed out my 32gb card.

Yeah that unfortunately is not surprising.

Personally, I’d say 64G is the minimum, and 128G+ is optimal

Hi, I’m trying to build PyTorch 1.7 in python 3.7 from source. But I run into some issues now. Can you give me some suggestions? Here is the link

Hi @bangwhe, please see my reply to your topic here: https://forums.developer.nvidia.com/t/compiled-pytorch-error-in-jetson-xavier-agx/178664/5?u=dusty_nv

Hi, when I run from my Jetson Nano:
python3 setup.py install --user

I got:
Illegal instruction (core dumped)

What could be worng here?

Hi @rafael3, try to run export OPENBLAS_CORETYPE=ARMV8 first. This could be due to a bug in numpy, see below:

Thanks @dusty_nv . I will try doing that!