Matt1234
Posts: 33
Joined: Mon Aug 06, 2012 12:34 pm

Python GPIO library problems...

Fri Aug 10, 2012 5:53 am

I am trying to install the python GPIO libary on my raspberry pi... I am following the meet the rapsberry pi book at the moment and so don't understand why it is going wrong. What is going wrong though is when I try to do 'sudo python setup.py install' ( this is to install the libary in python) I get tonnes of error messages. All other steps i think were completed successfully. The only thing that I am doing different from the book is the release number. In the book it is -0.2.0 I am putting in -0.3.1a.


Can somebody PLEASE help me!

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

Re: Python GPIO library problems...

Fri Aug 10, 2012 6:23 am

Not seen the book, but you'll need to show us a screen dump of the error messages in order to give help ;)

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

matthewtb
Posts: 32
Joined: Wed Nov 09, 2011 1:43 pm

Re: Python GPIO library problems...

Fri Aug 10, 2012 7:02 am

Okay here you are this what happens when you type : sudo python setup.py install

:roll:
Attachments
pic25903.gif
here you go TONNES of errors
pic25903.gif (1.79 KiB) Viewed 1996 times

matthewtb
Posts: 32
Joined: Wed Nov 09, 2011 1:43 pm

Re: Python GPIO library problems...

Fri Aug 10, 2012 7:08 am

Jesus wrong picture SORRY... here is the proper one...
:oops:

For some reason I cant upload the picture so I will write what it says:

source/py_gpio.c:250: error: expected '=' , ' ,' ,' ,',; 'asm' or '_attribute_' be


That line is repeated multiple times with slight variations... I am running debian at the moment will upgrade to raspbian soon though!

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

Re: Python GPIO library problems...

Fri Aug 10, 2012 7:11 am

...so have 2 Matthews with the same problem ;)

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

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

Re: Python GPIO library problems...

Fri Aug 10, 2012 7:11 am

I can't see your screenshot but have you done:

Code: Select all

sudo apt-get install python-dev python3-dev
(before installing module)

matthewtb
Posts: 32
Joined: Wed Nov 09, 2011 1:43 pm

Re: Python GPIO library problems...

Fri Aug 10, 2012 8:02 am

When I type in your command it comes up with the good ol' 404 error... What should I do now?

matthewtb
Posts: 32
Joined: Wed Nov 09, 2011 1:43 pm

Re: Python GPIO library problems...

Fri Aug 10, 2012 8:41 am

Got any ideas? :)

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

Re: Python GPIO library problems...

Fri Aug 10, 2012 9:51 am

Is your pi connected to the Internet ?
Can you try
Sudo apt-get update
Sudo apt-get upgrade

Then try croston's commands.
T.
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

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: Python GPIO library problems...

Fri Aug 10, 2012 9:55 am

Within Raspbian I use :

Code: Select all

wget http://raspberry-gpio-python.googlecode.com/files/python-rpi.gpio_0.3.1a-1_armhf.deb
then :

Code: Select all

sudo dpkg -i python-rpi.gpio_0.3.1a-1_armhf.deb
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

Return to “Python”