Installing torch and torch vision on Jetspack 6.2

Hello I am trying to install torch and torch vision on my jetson orin agx with the command found in the forums but I am getting some errors which lead to believe the server is down
wget https://pypi.jetson-ai-lab.dev/jp6/cu126/torch-2.7.0-cp310-cp310-linux_aarch64.whl
wget https://pypi.jetson-ai-lab.dev/jp6/cu126/torchvision-0.22.0-cp310-cp310-linux_aarch64.whl

If there is an alternative way to install these two packages it would be nice.

Thank you !!

*** Please note that this reply is generated by LLM automatically ***

Installing PyTorch and Torchvision on a Jetson Orin AGX can be a bit tricky, but don’t worry, I’m here to help.

Firstly, the error you’re encountering is likely due to the server being down or the URL being incorrect. The URLs you provided are specific to the Jetson AI Lab, which might not be the most reliable source.

Fortunately, there are alternative ways to install PyTorch and Torchvision on your Jetson Orin AGX. Here are a few options:

Option 1: Install using pip

You can try installing PyTorch and Torchvision using pip, which is the Python package manager. Make sure you have pip installed on your system, and then run the following commands:

pip3 install torch torchvision

This might take some time to install, depending on your internet connection and the package versions.

Option 2: Install using the NVIDIA PyTorch repository

NVIDIA provides a PyTorch repository specifically for Jetson devices. You can add this repository to your system and install PyTorch and Torchvision using the following commands:

sudo apt-get update
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev
sudo apt-get install python3-pip
pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v46/pytorch-lts/whl/cu113/torch torchvision

This method ensures that you’re installing the correct versions of PyTorch and Torchvision for your Jetson Orin AGX.

Option 3: Build from source

If you’re feeling adventurous, you can try building PyTorch and Torchvision from source. This method requires more technical expertise, but it allows you to customize the installation to your specific needs.

To build from source, you’ll need to clone the PyTorch and Torchvision repositories, install the dependencies, and then build the packages using the following commands:

git clone https://github.com/pytorch/pytorch.git
cd pytorch
git submodule update --init --recursive
pip3 install -r requirements.txt
python3 setup.py install

git clone https://github.com/pytorch/vision.git
cd vision
git submodule update --init --recursive
pip3 install -r requirements.txt
python3 setup.py install

Please note that building from source can take a significant amount of time and requires a good understanding of the build process.

In summary, you have three options to install PyTorch and Torchvision on your Jetson Orin AGX:

  1. Install using pip (quick and easy, but might not work due to server issues)
  2. Install using the NVIDIA PyTorch repository (recommended, as it ensures correct versions for your Jetson device)
  3. Build from source (more technical, but allows customization)

Choose the option that best suits your needs, and happy installing!

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

I have tried option1 and option 2 but still getting the same issue i am pretty sure I need to get from a source like ai labs. I am not an expert so option 3 is ruled out for me

For now you could use *.io which is an interim server; but it has torch2.8

https://pypi.jetson-ai-lab.io/jp6/cu126

Hi,

The link has been changed:

The compatibility can be found in the below source:
Please use:

torchvision('0.21.0', pytorch='2.6', requires='==36.*'),
...
torchvision('0.23.0', pytorch='2.8', requires='>=36'),

Thanks.

1 Like

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