How to use RPi.GPIO


I'm a beginner in OpenWrt and I'm using RPi zero w.

I installed pip and RPi.GPIO python module but when i use it test program it is giving import error, is there anyway to solve this.

Error i got:

root@OpenWrt:~# python
Traceback (most recent call last):
  File "/root/", line 1, in <module>
    import RPi.GPIO as GPIO    # Import Raspberry Pi GPIO library
  File "/usr/lib/python3.10/site-packages/RPi/GPIO/", line 23, in <module>
    from RPi._GPIO import *
ModuleNotFoundError: No module named 'RPi._GPIO'


good thinking, it's always wise to create a help me post, without actually posting
the error message you require help with ...

1 Like

Sorry, my bad. I have edited the post with error message i got