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

INSTALLING RPI.GPIO PACKAGE

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 setup.py 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?
Geoff

User avatar
croston
Posts: 666
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
Contact: Website

Re: INSTALLING RPI.GPIO PACKAGE

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 setup.py install command.

This is also explained in INSTALL.txt!

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

Re: INSTALLING RPI.GPIO PACKAGE

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
RPi.GPIO-0.3.1a.tar.gz
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!
Geoff

User avatar
RaTTuS
Posts: 9365
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: INSTALLING RPI.GPIO PACKAGE

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 :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

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

Re: INSTALLING RPI.GPIO PACKAGE

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 python.org/packages/source/R/RPi.GPIO/
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 setup.py 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-
lynux-anrvol.egg
finished processing dependencies for RPi.GPIO-0.3.1a'
however
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

Geoff

DavidMS
Posts: 130
Joined: Fri May 25, 2012 8:48 pm
Contact: Website

Re: INSTALLING RPI.GPIO PACKAGE

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 ??
http://meanderingpi.wordpress.com/
11 Raspberry Pi's and counting....

Reider
Posts: 75
Joined: Sun Mar 04, 2012 12:00 pm

Re: INSTALLING RPI.GPIO PACKAGE

Thu Jul 19, 2012 9:56 pm

All I did in a clean install of Raspbian, from the downloads page, was this;

http://www.raspberrypi-spy.co.uk/2012/0 ... -raspbian/

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

Steve

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

Re: INSTALLING RPI.GPIO PACKAGE

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!!

Geoff

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 20 guests