How to install latest torch torchvision to Jetson Nano in virtual environment

Dear NVIDIA Jetson Nano support!

I have followed GET STARTED https://pytorch.org/get-started/locally/ reference, installed all prerequsites, but below command returned an error. I’ve been trying to install torch and torchvision on Jetson Nano in my virtual envaironment (torch). Please help.

(torch) $ pip3 install torch torchvision

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Hi,

The default Torch package doesn’t built with ARM support.
To install it on Jetson Nano, you will need to build it from source.

For the building instructions, please check this topic for the details:
https://devtalk.nvidia.com/default/topic/1049071/jetson-nano/pytorch-for-jetson-nano/

Thanks.

Thanks for the information!
When do you plan to start support of Python 3.7 or 3.8 on Jetson Nano?

Hi,

The default python version for Nano is 3.6.
But you can install python3.7 or 3.8 on your own.

Thanks.

Is there any instruction how to install torch and torchvision for Python 3.7 or 3.8 on Jetson Nano?
How to install MAGMA (LAPACK support for the GPU) to Jetson Nano? https://github.com/pytorch/pytorch#from-source

Hi,

You can build it from source with the python you preferred.
Some tutorial can be found here:
https://devtalk.nvidia.com/default/topic/1049071/pytorch-for-jetson-nano-version-1-3-0-now-available/

Thanks.

You can build it from source with the python you preferred.
You did not answer my MAGMA question. Your suggestion won’t work unless NVIDIA/CUDA provided full support for Python 3.7+. Ok. I’ll raise this question about Jetson Nano Python 3.7+ support again, when Google CoLab (or any NVIDIA partner) has migrated from Python 3.6 to 3.7+.

Why do you need python 3.7? Nvidia uses the same version as Ubuntu 18.04, and I mean the exact same version because Canonical builds it. Pytorch seems to only require 3.5 anyway and recommend version is 3.6.

As Nvidia rep said, if you build your own for python 3.7 it should work. It’s not going to be any faster with 3.7, however, and you’re likely only going to run into trouble using a version that isn’t recommend by the package author.

Dear NVIDIA Support,

Why do you need python 3.7?
There are some latest packages which are not compatible with 3.6 (can’t disclose details). I have faced this issue and tryed to resolve the issue in Jetson Nano Python 3.7 virtualenv. I have failed to compile torch/torchvision due to missing Python 3.7 support for MAGMA (LAPACK support for the GPU) for Jetson Nano. Probaly some other “torch/torchvision install from source” prerequsites are missing for Jetson Nano as well.

Hi,

CUDA toolkit is a C++ based library. Suppose it won’t stop you to use python3.7.

It looks like the issue occurs from LAPACK? Is it correct?
You may need to build lots of libraries from source if you prefer a non-default python version.

Have you try to build it from source with python3.7 support?
Maybe you can based on this GitHub: https://github.com/Reference-LAPACK/lapack

Thanks.

Dear NVIDIA Support,

I beleive the torch and torchvision Python 3.7.4 issue on Jetson Nano is not related to CUDA. Most likely the issue is with LAPACK (and MAGMA). Will try to follow your advise… When do you plan official support of Python 3.7+ on Jetson Nano?

Thanks!

Hi,

In general, our package is built with default python support.
So we follow the version used by the official Ubuntu.

Thanks and sorry for any inconvenience.

Hi, You are right, but you can install latest Python >3.6 in docker container with all CUDA support based on CUDA verion installd on Jetson Nano host. If you have Jetson Nano image without Python 2.x and with Python >3.8.0, please let me know.