ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ImportError: No module named RPi.GPIO

asked 2015-11-19 02:16:51 -0500

Kazuki Kadonaka gravatar image

updated 2015-11-19 03:46:48 -0500

gvdhoorn gravatar image

I use ubuntu 14.04 on Raspberry Pi 2. I installed rpi.gpio

$sudo pip3 install RPi.GPIO 

ubuntu@ubuntu:~/catkin_ws$ rosrun ros_start
Traceback (most recent call last):
 File "/home/ubuntu/catkin_ws/src/ros_start/scripts/", line6, in <module>
    import RPi.GPIO as GPIO
ImportError: No module named RPi.GPIO

Please tell me the solution.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-19 03:47:22 -0500

gvdhoorn gravatar image

Afaik ROS doesn't use Python 3, but Python 2. You'll have to install RPi.GPIO for Python 2 (if possible).

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-11-19 02:16:51 -0500

Seen: 3,230 times

Last updated: Nov 19 '15