berry150
Posts: 8
Joined: Wed Feb 26, 2014 2:39 am

[Solved] Please help me install a module?

Sat Mar 01, 2014 2:46 am

Hi,
first off I am really new to linux so please bear with me...
I'd like to install a module called SoundAnalyse so that I can run this code.

I tried this command:

Code: Select all

pi@raspberrypi ~ $ sudo apt-get install python-SoundAnalyse
then I get

Code: Select all

E: Unable to find a source package for python-SoundAnalyse
Then I tried installing the module with virtualenv:

Code: Select all

(myenv)pi@raspberrypi ~ $ sudo pip install SoundAnalyse
result:

Code: Select all

Downloading/unpacking SoundAnalyse
  Downloading SoundAnalyse-0.1.1.tar.gz
  Running setup.py egg_info for package SoundAnalyse

Installing collected packages: SoundAnalyse
  Running setup.py install for SoundAnalyse
    building 'analyseffi' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c analyseffi.c -o build/temp.linux-armv6l-2.7/analyseffi.o
    analyseffi.c:1:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/pi/build/SoundAnalyse/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-jWJicR-record/install-record.txt:
    running install

running build

running build_py

creating build

creating build/lib.linux-armv6l-2.7

copying analyse.py -> build/lib.linux-armv6l-2.7

running build_ext

building 'analyseffi' extension

creating build/temp.linux-armv6l-2.7

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c analyseffi.c -o build/temp.linux-armv6l-2.7/analyseffi.o

analyseffi.c:1:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/pi/build/SoundAnalyse/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-jWJicR-record/install-record.txt failed with error code 1 in /home/pi/build/SoundAnalyse
Storing complete log in /root/.pip/pip.log
Could someone explain to me (step by step, in a noob-friendly way) how to install SoundAnalyse?
Thanks in advance!


EDIT:
OS: raspbian from noobs v 1.3.4
python v 2.7.3
Last edited by berry150 on Sat Mar 01, 2014 12:36 pm, edited 1 time in total.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Please help me install a module?

Sat Mar 01, 2014 7:20 am

Do this first:

Code: Select all

sudo apt-get install python-dev
and then rerun your last command.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

berry150
Posts: 8
Joined: Wed Feb 26, 2014 2:39 am

Re: Please help me install a module?

Sat Mar 01, 2014 12:35 pm

It worked! Thank you for answering.

Return to “Python”