7-1 PyTorch Environment Setup

Initial environment setup

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())
'

 

 

Copyright © 2026 YUAN High-Tech Development Co., Ltd.
All rights reserved.