Use sdkmanager to flash the jetson orin nx failed

I seem to have the exact same problem as @deng.luo. The Python versions seem to be as they were suggested by @WayneWWW:

python -V
Python 2.7.18

python2 -V
Python 2.7.18

python3 -V
Python 3.8.16

import yaml does also work in both Python Versions.
The problem is, that the tegrasign_v3_util.py script seems to be run in a Python3 environment (no matter the shebang, as suggested here) as

#!/usr/local/bin/python2
#
#
# Copyright (c) 2018-2024, NVIDIA Corporation.  All Rights Reserved.
#
# NVIDIA Corporation and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA Corporation is strictly prohibited.
#

from __future__ import print_function

import binascii
import hashlib
import json
import math
import struct
import os, sys
import subprocess
import re
import time
import traceback
print(sys.version)
import yaml

returns:

3.8.16 (default, Sep 10 2024, 13:23:32) 
[GCC 11.4.0]

EDIT:
JetPack6.0 and JetPack6.1 both produce this error.

EDIT2:
For me using sudo -i and installing pyYAML with the root user (pip install pyyaml) seems to have solved my problem.

2 Likes