PyTorch on Jetson Nano - HTTP Error 404

Hi! I’m following this guide: Installing PyTorch for Jetson Platform :: NVIDIA Deep Learning Frameworks Documentation and when I get to step 2, I get errors.

@ubuntu:~$ python3 -m pip install --upgrade pip; python3 -m pip install aiohttp numpy=='1.19.4' scipy=='1.5.3' export "LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:$LD_LIBRARY_PATH"; python3 -m pip install --upgrade protobuf; python3 -m pip install --no-cache $TORCH_INSTALL
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in ./.local/lib/python3.8/site-packages (22.3.1)
Defaulting to user installation because normal site-packages is not writeable
ERROR: Invalid requirement: 'LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:/usr/local/cuda-11.4/lib64:'
Hint: It looks like a path. File 'LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:/usr/local/cuda-11.4/lib64:' does not exist.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: protobuf in ./.local/lib/python3.8/site-packages (4.21.10)
Defaulting to user installation because normal site-packages is not writeable
Collecting https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/1.13.0a0+936e930.nv22.11
  ERROR: HTTP error 404 while getting https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/1.13.0a0+936e930.nv22.11
ERROR: Could not install requirement https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/1.13.0a0+936e930.nv22.11 because of HTTP error 404 Client Error: Not Found for url: https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/1.13.0a0+936e930.nv22.11 for URL https://developer.download.nvidia.cn/compute/redist/jp/v502/pytorch/1.13.0a0+936e930.nv22.11

Hi,

The link is not complete and JetPack 5.0.2 doesn’t support Nano.
Please update the package link to your JetPack version correspondingly.

For example:

$ export TORCH_INSTALL=https://developer.download.nvidia.cn/compute/redist/jp/v461/pytorch/torch-1.11.0a0+17540c5+nv22.01-cp36-cp36m-linux_aarch64.whl

Thanks.

I’m getting ERROR: torch-1.11.0a0+17540c5+nv22.01-cp36-cp36m-linux_aarch64.whl is not a supported wheel on this platform.; where can I find the correct torch version for my board?

Hi,

Please check which JetPack you use with the following command:

$ apt show nvidia-jetpack

Then find the corresponding package below and update the path:
https://developer.download.nvidia.com/compute/redist/jp/v461/pytorch/

Thanks.

1 Like

OK. The output I get is:

Package: nvidia-jetpack
Version: 5.0.2-b231
Priority: standard
Section: metapackages
Maintainer: NVIDIA Corporation
Installed-Size: 199 kB
Depends: nvidia-jetpack-runtime (= 5.0.2-b231), nvidia-jetpack-dev (= 5.0.2-b231)
Homepage: http://developer.nvidia.com/jetson
Download-Size: 29.3 kB
APT-Sources: https://repo.download.nvidia.com/jetson/common r35.1/main arm64 Packages
Description: NVIDIA Jetpack Meta Package

so I am using the URL https://developer.download.nvidia.com/compute/redist/jp/v502/pytorch/torch-1.13.0a0+936e9305.nv22.11-cp38-cp38-linux_aarch64.whl

It installed but I’m seeing some errors/warnings, are these OK?

@ubuntu:~$ python3 -m pip install --upgrade pip; python3 -m pip install aiohttp numpy=='1.19.4' scipy=='1.5.3' export "LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:$LD_LIBRARY_PATH"; python3 -m pip install --upgrade protobuf; python3 -m pip install --no-cache $TORCH_INSTALL
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in ./.local/lib/python3.8/site-packages (22.3.1)
Defaulting to user installation because normal site-packages is not writeable
ERROR: Invalid requirement: 'LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:/usr/local/cuda-11.4/lib64:'
Hint: It looks like a path. File 'LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:/usr/local/cuda-11.4/lib64:' does not exist.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: protobuf in ./.local/lib/python3.8/site-packages (4.21.10)
Defaulting to user installation because normal site-packages is not writeable
Collecting torch==1.13.0a0+936e9305.nv22.11
  Downloading https://developer.download.nvidia.com/compute/redist/jp/v502/pytorch/torch-1.13.0a0+936e9305.nv22.11-cp38-cp38-linux_aarch64.whl (573.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 573.8/573.8 MB 3.5 MB/s eta 0:00:00
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.8/dist-packages (from torch==1.13.0a0+936e9305.nv22.11) (4.4.0)
Installing collected packages: torch
  WARNING: The scripts convert-caffe2-to-onnx, convert-onnx-to-caffe2 and torchrun are installed in '/home/prakashlab/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed torch-1.13.0a0+936e9305.nv22.11

It does look like it is functioning properly:

@ubuntu:~$ python3
Python 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True

Hi,

Yes, the installation looks good.
Thanks.

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