sompor9
Posts: 13
Joined: Mon Oct 29, 2012 8:12 am

Cannot get Python GPIO Library

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?

sompor9
Posts: 13
Joined: Mon Oct 29, 2012 8:12 am

How to get Library pyhton GPIO

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 4830 times

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

Re: How to get Library pyhton GPIO

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, RasP.iO

Metatronin
Posts: 55
Joined: Sat Aug 04, 2012 5:19 am

Re: Cannot get Python GPIO Library

Sun Nov 04, 2012 6:30 pm

If you are running a current form of raspbian then it's pre installed.

sompor9
Posts: 13
Joined: Mon Oct 29, 2012 8:12 am

Re: How to get Library pyhton GPIO

Mon Nov 05, 2012 12:42 pm

Thank you for your recommend

angusbrasil
Posts: 4
Joined: Sun Dec 02, 2012 3:44 pm

Re: How to get Library pyhton GPIO

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 ?

User avatar
fdion
Posts: 307
Joined: Sun Sep 16, 2012 2:33 pm
Location: North Carolina, USA
Contact: Website

Re: How to get Library pyhton GPIO

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/20 ... -dash.html

François
Francois
http://raspberry-python.blogspot.com - http://www.3dFutureTech.info - @f_dion

angusbrasil
Posts: 4
Joined: Sun Dec 02, 2012 3:44 pm

Re: How to get Library pyhton GPIO

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".

User avatar
fdion
Posts: 307
Joined: Sun Sep 16, 2012 2:33 pm
Location: North Carolina, USA
Contact: Website

Re: How to get Library pyhton GPIO

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 - http://www.3dFutureTech.info - @f_dion

angusbrasil
Posts: 4
Joined: Sun Dec 02, 2012 3:44 pm

Re: How to get Library pyhton GPIO

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

angusbrasil
Posts: 4
Joined: Sun Dec 02, 2012 3:44 pm

Re: How to get Library pyhton GPIO

Wed Dec 12, 2012 12:31 am

I give up and install raspbmc that aready have gpio support and agt-get
:)

Return to “Python”

Who is online

Users browsing this forum: Ik0adr and 17 guests