How to get Library pyhton GPIO


11 posts
by sompor9 » Sun Nov 04, 2012 7:24 am
I use command

wget http://pypi.python.org/packages/source/ ... e859ded153

and result is


--2012-11-04 07:24:06-- http://pypi.python.org/packages/source/ ... .1a.tar.gz
Resolving pypi.python.org (pypi.python.org)... failed: No address associated with hostname.
wget: unable to resolve host address `pypi.python.org'

What is something wrong?
Posts: 13
Joined: Mon Oct 29, 2012 8:12 am
by sompor9 » Sun Nov 04, 2012 7:38 am
Hi Every one

I new user for Linux and Raspberry Pi.
How to get Library pyhton GPIO.

I Have problem in attach picture.
Attachments
ScreenHunter_01 Nov. 04 14.26.jpg
ScreenHunter_01 Nov. 04 14.26.jpg (32.03 KiB) Viewed 2155 times
Posts: 13
Joined: Mon Oct 29, 2012 8:12 am
by alexeames » Sun Nov 04, 2012 12:48 pm
RPi.GPIO is included in the latest Raspbian edition.

If it's not on the one you've got, you can easily

Code: Select all
sudo apt-get update
sudo apt-get install rpi.gpio


or...
Code: Select all
sudo apt-get install python-pip
sudo pip install rpi.gpio


From your error message it looks like your connection may have failed.
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2068
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by Metatronin » Sun Nov 04, 2012 6:30 pm
If you are running a current form of raspbian then it's pre installed.
Posts: 55
Joined: Sat Aug 04, 2012 5:19 am
by sompor9 » Mon Nov 05, 2012 12:42 pm
Thank you for your recommend
Posts: 13
Joined: Mon Oct 29, 2012 8:12 am
by angusbrasil » Mon Dec 03, 2012 1:34 am
Its possible to manualy install a lib ?

I want do create a plugin for Openelec to use interaction between the movie and some lights.
Openelec have python, but not the GPIO lib.

Maybe I can install it on some shared lib, or as a resource from the plugin.

Any ideias ?
Posts: 4
Joined: Sun Dec 02, 2012 3:44 pm
by fdion » Wed Dec 05, 2012 6:25 pm
angusbrasil wrote:Its possible to manualy install a lib ?

I want do create a plugin for Openelec to use interaction between the movie and some lights.
Openelec have python, but not the GPIO lib.

Maybe I can install it on some shared lib, or as a resource from the plugin.

Any ideias ?


RPi.GPIO is a python package that is on pypi, so it is very easy to install, using either easy_install or pip. I'm not going to retype all of this though, just check the beginning of this article:

http://raspberry-python.blogspot.com/2012/10/rpigpio-dot-dash.html

François
Francois
http://raspberry-python.blogspot.com - @f_dion
User avatar
Posts: 305
Joined: Sun Sep 16, 2012 2:33 pm
Location: North Carolina, USA
by angusbrasil » Thu Dec 06, 2012 2:18 am
But on OpenElec I dont have "apt-get", so I cant install the setup tools to use "easy_install".
Posts: 4
Joined: Sun Dec 02, 2012 3:44 pm
by fdion » Thu Dec 06, 2012 3:47 am
angusbrasil wrote:But on OpenElec I dont have "apt-get", so I cant install the setup tools to use "easy_install".

Just go here: http://pypi.python.org/pypi/setuptools

Download the setuptools-0.6c11-py2.7.egg and then:

Code: Select all
$ sudo sh setuptools-0.6c11-py2.7.egg


And you will have easy_install. Then you can sudo easy_install RPi.GPIO

Francois
Francois
http://raspberry-python.blogspot.com - @f_dion
User avatar
Posts: 305
Joined: Sun Sep 16, 2012 2:33 pm
Location: North Carolina, USA
by angusbrasil » Mon Dec 10, 2012 11:07 pm
It dont work that easy to me.

When I try to install the egg, i got this message.

setuptools-0.6c11-py2.7.egg: line 3: exec: python2.7: not found

I also try with the paramters --prefix=/usr/lib/python

I dont no if that python from openelec is incompleted.
So I download the 2.7 version, and try to install, but without success too.

./configure: line 429: expr: command not found
./configure.lineno: line 429: expr: command not found
Posts: 4
Joined: Sun Dec 02, 2012 3:44 pm
by angusbrasil » Wed Dec 12, 2012 12:31 am
I give up and install raspbmc that aready have gpio support and agt-get
:)
Posts: 4
Joined: Sun Dec 02, 2012 3:44 pm