GPIO and Python?

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

GPIO and Python?

Postby dohlfhauldhagen » Sat Dec 15, 2012 3:59 am

Hello. I have been trying to get the GPIO library for Python installed on my Raspberry Pi Model B for a while now, and I have had no success. Python is installed fine. I have been using this package:

https://aur.archlinux.org/packages.php?ID=59458

I have been running:

$ tar zxf RPi.GPIO-0.4.1a.tar.gz
$ cd RPi.GPIO-0.4.1a
$ sudo python setup.py install

And I have tried other packages as well. But thay all freeze on the install at the same place.

http://i.imgur.com/bRXNg.jpg

This is where it always hangs. Does anyone know how how I can get past this? Thanks for your help!
dohlfhauldhagen
 
Posts: 2
Joined: Sat Dec 15, 2012 3:43 am

Re: GPIO and Python?

Postby pepedog » Sat Dec 15, 2012 10:10 am

This is how you are supposed to build and install
$this->bbcode_second_pass_code('', 'pacman -Sy file base-devel abs git
wget https://aur.archlinux.org/packages/ra/raspberry-gpio-python/raspberry-gpio-python.tar.gz
tar xf raspberry-gpio-python.tar.gz
cd raspberry-gpio-python
makepkg -Acs --asroot
pacman -U raspberry-gpio-python<hit-tab-key-here>')
Now it's built and installed
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: GPIO and Python?

Postby dohlfhauldhagen » Sat Dec 15, 2012 3:18 pm

Awesome! It worked! As you can see, I am quite new to Arch, and Linux in general. Thank you very much for the reply :D
dohlfhauldhagen
 
Posts: 2
Joined: Sat Dec 15, 2012 3:43 am

Re: GPIO and Python?

Postby pepedog » Sat Dec 15, 2012 3:37 pm

Write to the person at https://aur.archlinux.org/packages.php?ID=59458
and say you had to
pacman -S python-distribute
and then it built
So it needs python-distribute in makedepends
in the mean time, it built and can be installed thus
$this->bbcode_second_pass_code('', 'pacman -U http://myplugbox.com/raspberry-gpio-python-0.4.1a-1-any.pkg.tar.xz')

Edit, you edited your post from "not working" to "working". If python-distribute was installed, it builds in seconds
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: GPIO and Python?

Postby ingamedeo » Sat Mar 16, 2013 1:07 pm

Package on AUR is not updated anymore!

Please install from https://pypi.python.org/pypi/RPi.GPIO !!

Remember! Python and python-distribute are required dependences!
ingamedeo
 
Posts: 5
Joined: Mon Dec 24, 2012 10:53 am

Re: GPIO and Python?

Postby kendallv » Mon Jul 08, 2013 5:33 pm

For anyone else new to Linux, it might be worthwhile mentioning that you need base-devel installed (might as well install everything in it) and that you do not, contrary to instructions I have seen elsewhere, need python-dev. Headers are included in Arch packages; python-dev does not exist.

So the procedure would be
$this->bbcode_second_pass_code('', '
# pacman -S python python-pip base-devel
# pip install RPi.GPIO
')
kendallv
 
Posts: 1
Joined: Mon Jul 08, 2013 2:31 pm

Re: GPIO and Python?

Postby StayFrosty » Fri Aug 02, 2013 9:45 pm

It looks like micky took over maintenance of raspberry-gpio-python and split it into python2-raspberry-gpio and python-raspberry-gpio for Python2 and Python3 versions in AUR.

You can install it with yaourt which is imho cleaner than using pip.
StayFrosty
 
Posts: 2
Joined: Tue Jul 13, 2010 2:49 pm

Re: GPIO and Python?

Postby StayFrosty » Fri Aug 02, 2013 9:47 pm

:o I just realized this is my first post despite 3 years of membership on this site :shock:
StayFrosty
 
Posts: 2
Joined: Tue Jul 13, 2010 2:49 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 12 guests