speech_recognition icon indicating copy to clipboard operation
speech_recognition copied to clipboard

Facing issues in installing pyaudio

Open Smruti1998 opened this issue 2 years ago • 2 comments

I'm constantly getting this error, please give me solution for this,

Defaulting to user installation because normal site-packages is not writeable Collecting pyaudio Using cached PyAudio-0.2.11.tar.gz (37 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [11 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 14, in File "C:\Program Files\Python310\setuptools_init_.py", line 2, in from setuptools.extension import Extension, Library File "C:\Program Files\Python310\setuptools\extension.py", line 5, in from setuptools.dist import _get_unpatched File "C:\Program Files\Python310\setuptools\dist.py", line 103 except ValueError, e: ^^^^^^^^^^^^^ SyntaxError: multiple exception types must be parenthesized [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Smruti1998 avatar Feb 28 '22 15:02 Smruti1998

PIP's PyAudio doesn't support python 3.10. Download it from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio and install it via pip install %actualPackageName% ran in the downloaded directory

ghost avatar Mar 11 '22 19:03 ghost

Hello, I had this problem too the first time I installed. It's a problem with Windows, The fix is below.

pip install pipwin
pipwin install PyAudio

Ccode-lang avatar May 25 '22 18:05 Ccode-lang