--install-headers 'C:\Users\HP\AppData\Roaming\Python\Python37\Include\RPi.GPIO' Check the logs for full command output.
Error: process returned with code 1 It seems like I cannot download GPIO...

  • 4
    You can't run RPi.GPIO on Windows, it's only compatible with Raspberry Pi hardware.
    – Dougie
    Commented Mar 4, 2022 at 22:07
  • (1) So you are using Thonny MicroPython IDE on PC Window, to talk to Rpi Pico through a USB serial adaptor cable. Me too. (2) I repeated your experiment to try to download Rpi.GPIO to my Pico. I got the warning message something like "Rpi.GPIO is not compatible to MicroPython or Circuit Python.", ... So I did not proceed. Let me explain why.
    – tlfong01
    Commented Mar 5, 2022 at 2:14
  • (2) For Rpi2/2/3/4, Rpi.GPIO is built in, there is no need to download, you just import it. And for Pico, You need to do the following to start using GP: from machine import Pin.
    – tlfong01
    Commented Mar 5, 2022 at 2:18

1 Answer 1


You can't install RPi.GPIO on Windows. If you want to mock GPIO calls on a PC, try gpiozero which has a mock pin interface: https://gpiozero.readthedocs.io/en/stable/api_pins.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.