RPi.GPIO for Python 3

Options
Thomas Grzesitza
Thomas Grzesitza New Member Posts: 4
Hello,

i have install RPi.GPIO with.
apt-get install python3-pip

pip3 install RPi.GPIO

and get this massage now.
>>>
[�[1;32mINFO�[0m   ] [Logger      ] Record log in /root/.kivy/logs/kivy_16-09-15_13.txt
[�[1;32mINFO�[0m   ] [Kivy        ] v1.9.2-dev0
[�[1;32mINFO�[0m   ] [Python      ] v3.4.2 (default, Oct  8 2014, 10:45:20) 
[GCC 4.9.1]
[�[1;32mINFO�[0m   ] [Factory     ] 193 symbols loaded
[�[1;32mINFO�[0m   ] [Image       ] Providers: img_tex, img_dds, img_gif, img_pygame (img_pil, img_ffpyplayer ignored)
[�[1;32mINFO�[0m   ] [Text        ] Provider: pygame
 Traceback (most recent call last):
   File "/home/fischer/main.py", line 13, in <module>
     import RPi.GPIO as GPIO
   File "/usr/local/lib/python3.4/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!
>>> 


Is there a other version for the UP Board or what can i do in this reason ?

Comments

  • Dan O'Donovan
    Dan O'Donovan Administrator, Moderator, Emutex Posts: 241 admin
    Options
    If you're running ubilinux, we have included a modified version of RPi.GPIO for UP. It's pre-installed.

    We don't have plans to package this for other distros at this time.

    What distro are you currently using on UP?

    You might be able to take the ubilinux package manually from here and install it on your distro:
    http://ubilinux.org/ubilinux/pool/main/r/rpi-gpio/
  • Arnaud
    Arnaud New Member Posts: 1
    edited October 2016
    Options
    hey dan , I'm trying to install the gpio package manually but I ran into a few problems.

    Could you please help me to find the way to install it.

    I tried to install the gpio python library from the link post befort, here wat I got:

    Python 2.7.9 (default, Aug 13 2016, 16:41:35)
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import RPi.GPIO
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    RuntimeError: This module can only be run on a Raspberry Pi!


    Thanks in advance.