jobin-sun / raspberry-gpio-python

Automatically exported from code.google.com/p/raspberry-gpio-python
MIT License
0 stars 0 forks source link

Instalallation issues on RPi debian wheezy #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. download the tar.gz file (not the .deb) and unzip to a folder
2. start: sudo python setup.py install (see below)

----
What is the expected output? What do you see instead?
gcc terminated, Pyrhon.h not found

source/py_gpio.c:23:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
-----
What version of the product are you using? On what operating system?
RPi.GPIO-041a
debian wheezy on Raspberry Pi (standard image) with user pi

-----
Please provide any additional information below.

pi@raspberrypi ~/RPi.GPIO-0.4.1a $ sudo python setup.py install
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth 
files
running bdist_egg
running egg_info
writing RPi.GPIO.egg-info/PKG-INFO
writing top-level names to RPi.GPIO.egg-info/top_level.txt
writing dependency_links to RPi.GPIO.egg-info/dependency_links.txt
reading manifest file 'RPi.GPIO.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'RPi.GPIO.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv6l/egg
running install_lib
running build_py
running build_ext
building 'RPi.GPIO' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c source/py_gpio.c -o 
build/temp.linux-armv6l-2.7/source/py_gpio.o
source/py_gpio.c:23:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

Original issue reported on code.google.com by guido.wo...@gmx.de on 2 Feb 2013 at 9:30

GoogleCodeExporter commented 9 years ago
On Debian Wheezy it should already be installed as part of the standard image. 
You can check this in Python:
>>> import RPi.GPIO as GPIO

If you have an ancient version of Raspbian::
$ sudo apt-get install python-rpi.gpio

If you still want to build from source, you need to install the python 
development files:
$ sudo apt-get install python-dev

Original comment by btcros...@googlemail.com on 3 Feb 2013 at 10:24