MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Having trouble with pyaudio for MMM-awesome-alexa

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    2 Posts 1 Posters 1.1k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jmartin1009
      last edited by

      i was able to do the setup for the line of

      sudo apt-get install swig3.0 python-pyaudio python3-pyaudio sox
      

      but when i tried to do

      pip install pyaudio
      

      i got a large error message saying:

      pi@raspberrypi:~ $ pip install pyaudio
      Collecting pyaudio
        Downloading https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
      Building wheels for collected packages: pyaudio
        Running setup.py bdist_wheel for pyaudio ... error
        Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-iJzkjw/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpTyBzJLpip-wheel- --python-tag cp27:
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build/lib.linux-armv7l-2.7
        copying src/pyaudio.py -> build/lib.linux-armv7l-2.7
        running build_ext
        building '_portaudio' extension
        creating build/temp.linux-armv7l-2.7
        creating build/temp.linux-armv7l-2.7/src
        arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-Ub3vap/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-armv7l-2.7/src/_portaudiomodule.o
        src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
         #include "portaudio.h"
                               ^
        compilation terminated.
        error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
        
        ----------------------------------------
        Failed building wheel for pyaudio
        Running setup.py clean for pyaudio
      Failed to build pyaudio
      Installing collected packages: pyaudio
        Running setup.py install for pyaudio ... error
          Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-iJzkjw/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-UfXgaL-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
          running install
          running build
          running build_py
          creating build
          creating build/lib.linux-armv7l-2.7
          copying src/pyaudio.py -> build/lib.linux-armv7l-2.7
          running build_ext
          building '_portaudio' extension
          creating build/temp.linux-armv7l-2.7
          creating build/temp.linux-armv7l-2.7/src
          arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-Ub3vap/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-armv7l-2.7/src/_portaudiomodule.o
          src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
           #include "portaudio.h"
                                 ^
          compilation terminated.
          error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
          
          ----------------------------------------
      Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-iJzkjw/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-UfXgaL-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-iJzkjw/pyaudio/
      

      how do i fix this?

      1 Reply Last reply Reply Quote 0
      • J Offline
        jmartin1009
        last edited by

        nevermind figured it out but idk how to mark as solved, had to get python dev stuff, heres a link if anyone else has issues:
        SOLUTION

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy