To install pytorch you can run the following commands
# Installs torch/torchvision built for JP6 + CUDA 12.6
python3 -m pip install --upgrade pip
pip3 install torch torchvision --index-url https://pypi.jetson-ai-lab.io/jp6/cu126
An NVIDIA moderator pointed users to this package for the installation JetPack 6.2.1 Prebuilt package for tensorflow and pytorch in Jetson AGX Dev Kit