Pytorch_yolov8 run error

When I run samples/object detection/custom detector/python/pytorch_yolov8 has some error.Who can help me?

run info:

/home/nvidia/miniconda3/envs/yolov8/bin/python /home/nvidia/zed/yolov8/zed/detector.py --weights ../yolov8s.pt --img_size 640 
Intializing Network...Initializing Camera...

Initialized Camera
freeglut (/home/nvidia/zed/yolov8/zed/detector.py):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

opengl info:

(yolov8) nvidia@miivii-tegra:/usr/local/zed$ glxinfo | grep -i opengl
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA Tegra Orin (nvgpu)/integrated
OpenGL core profile version string: 4.6.0 NVIDIA 35.1.0
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 35.1.0
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 35.1.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

jetson info:

(yolov8) nvidia@miivii-tegra:/usr/local/zed$ jetson_release -v
Software part of jetson-stats 4.2.2 - (c) 2023, Raffaello Bonghi
Model: Jetson AGX Orin - Jetpack 5.0.2 GA [L4T 35.1.0]
NV Power Mode[0]: MAXN
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - 699-level Part Number: 699-13701-0004-500 F.0
 - P-Number: p3701-0004
 - Module: NVIDIA Jetson AGX Orin (32GB ram)
 - SoC: tegra23x
 - CUDA Arch BIN: 8.7
 - Codename: Concord
Platform:
 - Machine: aarch64
 - System: Linux
 - Distribution: Ubuntu 20.04 focal
 - Release: 5.10.104-tegra
 - Python: 3.8.10
jtop:
 - Version: 4.2.2
 - Service: Active
Libraries:
 - CUDA: 11.4.239
 - cuDNN: 8.4.1.50
 - TensorRT: 8.4.1.5
 - VPI: 2.1.6
 - Vulkan: 1.3.203
 - OpenCV: 4.5.4 - with CUDA: NO

Can you run

sudo apt install --reinstall nvidia-jetpack

?

I run your code,it can not work.

(base) nvidia@miivii-tegra:~$ sudo apt install --reinstall nvidia-jetpack
[sudo] password for nvidia:
Sorry, try again.
[sudo] password for nvidia:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nvidia-jetpack

Are you using a jetson ? What kind ?