Skip to main content

7-1 PyTorch Environment Setup

PANDORA DEVELOPER GUIDE · CHAPTER 07

Initial environment setup ➤ For the installation of JetPack and Python-related tools, you can review: [ Chapter 2-3: Installing the Jetson Component Environment ]

sudo apt update && \
sudo apt install nvidia-jetpack -y && \
sudo apt install python3-pip -y

Install and test PyTorch

Verify available versions for installation

// Install dependencies
sudo apt install libopenblas-dev -y
// Verify available versions
pip3 index versions torch -i https://pypi.jetson-ai-lab.io/jp6/cu126
// Install a specific version (this tutorial uses v2.8.0)
pip3 install torch==2.8.0 -i https://pypi.jetson-ai-lab.io/jp6/cu126
// Test the installation
python3 -c '
import torch
print(f"PyTorch version: {torch.__version__}")
print(f"CUDA available: {torch.cuda.is_available()}")
print(torch.__config__.show())
'

Adapted from the original YUAN Developer Hub article. Source ID: 255.