Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A13 => Topic started by: MMp131316 on April 13, 2013, 02:11:39 PM

Title: A13 python GPIO problem
Post by: MMp131316 on April 13, 2013, 02:11:39 PM
Hello all,
i am trying to install the python GPIO package for olinuxino a13 however i receive an error.
My python version on the board is Python v 2.7 and the error sounds like this :

source/pyA13.c:23:20: fatal error: Python.h no such file or directory compilation terinated.
error: command 'gcc' failed with exit status 1

It doesn't find the python.h file ...
I have also tried with an earlier version pyA13-0.1.7 and there i get another error:
source/gpio_lib.c:39:22: fatal error: gpio_lib.h: No such file or directory compilation terminated
error: command 'gcc' failed with exit status 1

I am installing it like this..
#tar -zxvf pyA13-0.1.7.tar.gz
#cd pyA13-0.1.7
#sudo python setup.py install

also i checked this site
http://olimex.wordpress.com/2013/03/08/a13-olinuxino-gpio-python-libraries/ (http://olimex.wordpress.com/2013/03/08/a13-olinuxino-gpio-python-libraries/)
Title: Re: A13 python GPIO problem
Post by: JohnS on April 13, 2013, 02:49:45 PM
You probably need python-dev package

If not that, try google with
"python.h"

John
Title: Re: A13 python GPIO problem
Post by: MMp131316 on April 13, 2013, 04:45:12 PM
I tried installing the python dev package however i get errors :-[ i tried also with version 2.6...

dpkg -i python-dev_2.7.3-0ubuntu7_armhf.deb
(Reading database ... 55882 files and directories currently installed.)
Preparing to replace python-dev 2.7.3-0ubuntu7 (using python-dev_2.7.3-0ubuntu7_armhf.deb) ...
Unpacking replacement python-dev ...
dpkg: dependency problems prevent configuration of python-dev:
python-dev depends on python (= 2.7.3-0ubuntu7); however:
  Version of python on system is 2.7.3~rc2-1.
python-dev depends on python2.7-dev (>= 2.7.3); however:
  Package python2.7-dev is not installed.
dpkg: error processing python-dev (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db ...
/usr/bin/mandb: can't write to /var/cache/man/1619: No space left on device
Errors were encountered while processing:
python-dev
Title: Re: A13 python GPIO problem
Post by: MMp131316 on April 13, 2013, 10:03:49 PM
I freed all my memoryand reinstalled a fresh os and now when i am extrating the python dev it just says
processing triggers for man-db ...
errors were encountered while processing: python-dev

it says nothing about the nature of the errors.....
What is it???? ???
Title: Re: A13 python GPIO problem
Post by: MMp131316 on April 14, 2013, 08:56:42 PM
does anyone know how to install packages(like python dev) without dependency checking?
Title: Re: A13 python GPIO problem
Post by: olimex on April 14, 2013, 09:52:43 PM
what linux image you are using?
the official Debian Linux image have inside pre-installed python https://www.olimex.com/wiki/Prebuilt_SD_card_images_running_debian#Official_Debian_images_by_Olimex
Title: Re: A13 python GPIO problem
Post by: MMp131316 on April 15, 2013, 12:59:42 AM
First of all thank you for the relpy! However i managed to solve the problem ;)
The idea is that i used the images
A13 Debian 2GB card image without XFCE4 with GCC, GPIO, WIFI, WTHERNET, UVC, Python, OpenCV
r18 and r17
I installed and reinstalled some of the images because i thought at first that the were not correctly installed or something happened during instalation, but the result was the same

With all the above images i had problems installing the a13 gpio package for python...
On the ones that didn't have python i installed python first
In the end i installed this image
A13 Advanced Debian 4GB card image with XFCE4, GCC, GPIO, WIFI, WTHERNET, UVC, Python, OpenCV;
And with this one i was able to install the package and test it with the blink program - and it worked  8)