8 posts
by Geoff shepherd » Wed Jul 18, 2012 8:59 pm
i have downloaded the RPi.GPIO-0.3.1a.tar.gz package several times using several routes but each time when i install it using "sudo python install" i get a screen full of errors that disappear before i can read them. the gist of the messages seem to be an error in the install.txt file(?). is this a known problem? the installation is as you would expect unsuccessful.
I have attempted to obtain the tar file using my MAC but this reports that it is unable to unpack the files. I successfully got the RPi.GPIO-0.3.1a directory and contents using a Linux installation on a virtual box installation.
any ideas?
Posts: 11
Joined: Wed Jul 11, 2012 10:12 am
by croston » Wed Jul 18, 2012 9:14 pm
Which Linux distro are you using? Squeeze? Wheezy? Raspbian? Arch? The exact answer varies between distros but assuming Debian and Python 2.x:
Code: Select all
$ sudo apt-get install python-dev

Before the sudo python install command.

This is also explained in INSTALL.txt!
User avatar
Posts: 657
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
by Geoff shepherd » Thu Jul 19, 2012 8:55 am
i cannot access net from pi so i am using a linux emulation on my mac.
i then copy the tar file to a usb device which i attach to my pi running debian squeeze. i mount the usb device and can see the tar file when i dc to the sub-directory. if i run tar from the pi login i get errors about no directory available. if i sudo bash and then run tar i get the error: Cannot change ownership to UID 1000 gig 1000: operation not permitted.
if i run startx and try to run tar from a terminal emulation i get the following messages

pi@raspberrypi: sudo bash
root@raspberrypi: cd /media/usbdev
root@raspberrypi:/media/usbdev// ls
root@raspberrypi:/media/usbdev// ltad zxf RPi.GPIO-0.3.1a.tar.gz

tar: Child returned status 1
tar: Error is not recoverable: exiting now

can you help me load the GPIO package - i have constructed a neat interface and i have plans!
Posts: 11
Joined: Wed Jul 11, 2012 10:12 am
by RaTTuS » Thu Jul 19, 2012 9:04 am
you possibly have a corrupted tar file
or you do not have write permissions for the directory
download it again
or try it in your home directory
How To ask Questions :-
WARNING - some parts of this post may be erroneous YMMV

User avatar
Posts: 9137
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
by Geoff shepherd » Thu Jul 19, 2012 2:57 pm
i have got a longer ethernet cable and used wget to download the RPi.GPIO package.
i performed sudo apt-get update which completed ok
I then performed ' sudo apt-get install python' which updated succesfully
i used 'wget http://pypi
RPi.GPIO-0.3.1a.tar.gz' and this completed ok
i ran tar
Tar zxf RPi.GPIO-0.3.1a.tar.gz and this unpacked the files into RPi.GPIO-0.3.1a
i used 'cd RPi.GPIO-0.3.1a' to change the directory
i ran 'sudo python install' and this worked producing quite a lot of messages the final lines were
'installed /usr/local/lib/python2.6/dist-packages/RPi.GPIO-0.3.1a-py2.6-
finished processing dependencies for RPi.GPIO-0.3.1a'
when i invoke python and type
>> import RPi.GPIO as GPIO
i get
'Import error no module named GPIO'
this is probably trivial but beyond me at the moment

Posts: 11
Joined: Wed Jul 11, 2012 10:12 am
by DavidMS » Thu Jul 19, 2012 6:40 pm
I am having the same problem. Installing RPi.GPIO on Squeeze and wheezy worked fine falling the instructions in the MAGpi issue2 but installing with the Raspian image. That said this is 0.3.1a and I think previously I installed 0.2.

Ok so realising I have changed 2 things have gone back to square one this time have tried to install version 0.2.0 - and everything works fine. so I guess the issue is with 0.3.1a ??
11 Raspberry Pi's and counting....
Posts: 127
Joined: Fri May 25, 2012 8:48 pm
by Reider » Thu Jul 19, 2012 9:56 pm
All I did in a clean install of Raspbian, from the downloads page, was this; ... -raspbian/

Worked a treat and my Python LCD programs, which rely on RPi.GPIO, started working again after my move from Wheezy to Raspbian.

Posts: 75
Joined: Sun Mar 04, 2012 12:00 pm
by Geoff shepherd » Fri Jul 20, 2012 7:18 pm
thank you all for your advice. the download of wheezy and re installation of the GPIO worked as described.
now to get the lights flashing and the CNC lathe working!!

Posts: 11
Joined: Wed Jul 11, 2012 10:12 am