# Erro "import RPi.GPIO" This module can only be run on a Raspberry Pi!

**URL:** <https://forum.ubiquityrobotics.com/t/erro-import-rpi-gpio-this-module-can-only-be-run-on-a-raspberry-pi/853>\
**Category:** Uncategorized\
**Created:** [July 17, 2021, 8:09pm UTC](https://forum.ubiquityrobotics.com/t/erro-import-rpi-gpio-this-module-can-only-be-run-on-a-raspberry-pi/853 "2021-07-17T20:09:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mateus\_guilherme](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@mateus\_guilherme](https://forum.ubiquityrobotics.com/u/mateus_guilherme)\
**Post date:** [July 17, 2021, 8:09pm UTC](https://forum.ubiquityrobotics.com/t/erro-import-rpi-gpio-this-module-can-only-be-run-on-a-raspberry-pi/853/1 "2021-07-17T20:09:30Z")

</div>

Hi

i have a raspberry pi 4 and i downloaded the image with ROS ( 2020-11-07). When I ran a python script that uses GPIO pins I got the following message:

```auto
Traceback (most recent call last):
   File "/home/ubuntu/catkin_ws/src/auto_docking/scripts/autoDocking.py", line 14, in <module>
     import RPi.GPIO as GPIO
   File "/usr/lib/python2.7/dist-packages/RPi/GPIO/ __init__.py", line 23, in <module>
     from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!

```

Does anyone have any suggestions?
