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

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 led_blink.py
Traceback (most recent call last):
 File "/home/ubuntu/catkin_ws/src/ros_start/scripts/led_blink.py", 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
0

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

Stats

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

Seen: 3,177 times

Last updated: Nov 19 '15