WaltMc
Posts: 6
Joined: Sun Apr 07, 2013 12:09 am

python-rpi.gpio

Sat May 04, 2013 3:41 pm

I'm look for the python-rpi.gpio library. I have done several searches with no results including the Raspberry Pi forums.
'
I have downloaded Python 2.7.4 into my Rasp. Pi successfully. I just need the gpio libraries.
'
Any help would be great.

canibalimao
Posts: 557
Joined: Tue Aug 07, 2012 8:48 pm
Location: Portugal

Re: python-rpi.gpio

Sat May 04, 2013 4:10 pm

Which SO are you using? Raspbian? If yes, you don't need to install anything, it's installed by default.

WaltMc
Posts: 6
Joined: Sun Apr 07, 2013 12:09 am

Re: python-rpi.gpio

Sun May 05, 2013 3:39 am

I bought the rpi in march it has "14/03" in white mask on the bottom.
'
With the pi@raspberrpi:-$
'
I enter " sudo apt-get install python-rpi.gpio "
'
I get "E: unable to locate package python-rpi.gpio"
"E: couldn't find any package by regex 'python-rpi.gpio"
'
Any help would be great.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: python-rpi.gpio

Sun May 05, 2013 7:31 am

You can find it here
https://pypi.python.org/pypi/RPi.GPIO

but if you are using a recent Raspbian image it should already be on there.

You need sudo to use it though.

Check if you've got it like this...

Code: Select all

sudo python
import RPi.GPIO as GPIO
If you don't get an error, you already have it.

Code: Select all

CTRL+D
to exit python.
Alex Eames RasPi.TV, RasP.iO

WaltMc
Posts: 6
Joined: Sun Apr 07, 2013 12:09 am

Re: python-rpi.gpio

Sun May 05, 2013 7:29 pm

I've downloaded RPi.GPIO.0.5..2a.tar.gz from the link you posted
but I'm still getting an "E: Unable to locate package python-rpi.gpio"?
'
I'm saving this in "home/pi". Do i need to save it to a different folder?

jhvorlicky
Posts: 1
Joined: Sun May 05, 2013 7:41 pm

Re: python-rpi.gpio

Sun May 05, 2013 7:54 pm

Hi WaltMc,
I found that ver 0.2.0 works just fine for my purposes - did you try this?
http://raspberry-gpio-python.googlecode ... 2.0.tar.gz
I had exactly your problem with 0.5.2a...

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: python-rpi.gpio

Sun May 05, 2013 9:21 pm

WaltMc wrote:I've downloaded RPi.GPIO.0.5..2a.tar.gz from the link you posted
but I'm still getting an "E: Unable to locate package python-rpi.gpio"?
'
I'm saving this in "home/pi". Do i need to save it to a different folder?
Hi,
after you have downloaded the gz file you need to extract it, then install it.
Alternatively, from the INSTALL,TXT file you'll file in the extracted folder, it states :
If you are using Raspbian, all you need to do to install the latest release is:
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get install python-rpi.gpio python3-rpi.gpio

------------

If you want to build your own version from this downloaded copy, make
sure that you have the Python development source installed first!

On Raspbian:
$ sudo apt-get install python-dev python3-dev

To install the module:

$ sudo python setup.py install
or
$ sudo python3 setup.py install
But as stated, there is version, maybe not the latest version, pre-installed with raspbian wheezy OS.
To check which version you have running on your system enter python with

Code: Select all

>>> import RPi.GPIO as gpio
>>> gpio.VERSION
'0.5.0a'
>>>

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Return to “General discussion”