0

I am trying to make a Virtual Assistant and for that i am using PyGame but when i am trying to install PyGame am stuck with this errors, is there any way to get around? I have tried everything but did not succeed

Errors -

Collecting PyAudio
  Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Building wheels for collected packages: PyAudio
  Building wheel for PyAudio (setup.py): started
  Building wheel for PyAudio (setup.py): finished with status 'error'
  Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
  Running setup.py install for PyAudio: started
    Running setup.py install for PyAudio: finished with status 'error'

  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pycharm-packaging/PyAudio/setup.py'"'"'; __file__='"'"'/private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pycharm-packaging/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 /private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pip-wheel-u4fzx0xa --python-tag cp38
       cwd: /private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pycharm-packaging/PyAudio/
  Complete output (18 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.8
  copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.8
  warning: build_py: byte-compiling is disabled, skipping.

  running build_ext
  building '_portaudio' extension
  creating build/temp.macosx-10.9-x86_64-3.8
  creating build/temp.macosx-10.9-x86_64-3.8/src
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.8/src/_portaudiomodule.o
  src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
  #include "portaudio.h"
           ^~~~~~~~~~~~~
  1 error generated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for PyAudio
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pycharm-packaging/PyAudio/setup.py'"'"'; __file__='"'"'/private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pycharm-packaging/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 /private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pip-record-xbb40_p1/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pycharm-packaging/PyAudio/
    Complete output (18 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.8
    copying src/pyaudio.py -> build/lib.macosx-10.9-x86_64-3.8
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    building '_portaudio' extension
    creating build/temp.macosx-10.9-x86_64-3.8
    creating build/temp.macosx-10.9-x86_64-3.8/src
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DMACOSX=1 -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/_portaudiomodule.c -o build/temp.macosx-10.9-x86_64-3.8/src/_portaudiomodule.o
    src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
    #include "portaudio.h"
             ^~~~~~~~~~~~~
    1 error generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pycharm-packaging/PyAudio/setup.py'"'"'; __file__='"'"'/private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pycharm-packaging/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 /private/var/folders/4b/qbpxp4qj1cd8h1m1x1vd59xw0000gn/T/pip-record-xbb40_p1/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Please help me to resolve this errors

1 Answer 1

2

It seems like you're missing a dependency called portAudio. Try the following:

brew install portaudio

Brew installation guide in case you don't have it already

Sign up to request clarification or add additional context in comments.

3 Comments

This helped me to install PyGame but when i run my code now i get this error - (check above in my question)
I'd suggest you create a new question for your runtime error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.