GPIO library installation1. Install Jetson.GPIO library1.1. Automatic installation1.2. Manual installation2. Set user permissions3. Custom rule file3.1. Copy the rule file3.2. Reload udev rules4. Set the motherboard model5. References
The system installs Jetson.GPIO library by default, so you can skip this step.
xxxxxxxxxxsudo pip3 install Jetson.GPIO

It is recommended to use the automatic installation method. Manual installation may not be the latest version.
xxxxxxxxxxgit clone https://github.com/NVIDIA/jetson-gpio
xxxxxxxxxxcd ~/jetson-gpio/
xxxxxxxxxxsudo python3 setup.py install

Allow the current system user to access and use the Jetson.GPIO library: where jetson is the system user name
xxxxxxxxxxsudo groupadd -f -r gpiosudo usermod -a -G gpio jetson

xxxxxxxxxxcd ~/jetson-gpio/sudo cp lib/python/Jetson/GPIO/99-gpio.rules /etc/udev/rules.d/
xxxxxxxxxxsudo udevadm control --reload-rules && sudo udevadm trigger

Currently, Jetpack6.1 does not set the motherboard model in advance. You need to set the motherboard model in the terminal before controlling GPIO each time:
xxxxxxxxxxexport JETSON_MODEL_NAME=JETSON_ORIN_NANO