0

when i try to install pyaudio it is also showing the following error

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 c:\users\hp\appdata\local\programs\python\python37\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HP\AppData\Local\Temp\pip-install-okii4l8n\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 C:\Users\HP\AppData\Local\Temp\pip-record-fpl5yt23\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win-amd64-3.7 copying src\pyaudio.py -> build\lib.win-amd64-3.7 running build_ext building '_portaudio' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

I have also tried to execute this in many different ids but it is not properly working.

Traceback (most recent call last): File "C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\speech_recognition__init__.py", line 108, in get_pyaudio import pyaudio ModuleNotFoundError: No module named 'pyaudio'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:/study material/python programs/practice programs/jarvis2.py", line 66, in query = takeCommand().lower() File "E:/study material/python programs/practice programs/jarvis2.py", line 38, in takeCommand with sr.Microphone() as source: File "C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\speech_recognition__init__.py", line 79, in init self.pyaudio_module = self.get_pyaudio() File "C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\speech_recognition__init__.py", line 110, in get_pyaudio raise AttributeError("Could not find PyAudio; check installation") AttributeError: Could not find PyAudio; check installation

Thales Minussi
  • 6,965
  • 1
  • 30
  • 48

3 Answers3

0

It seems that you need "Microsoft Visual C++ Build Tools" from the website listed, but PyAudio is kinda broken...

I had the same error, so what you could do is create a condition that activates a text command line. I have a similar code to yours on https://github.com/PythonGuy888/ATLAS where I created said condition as the PC I'm developing the code on can't install PyAudio either.

TylerH
  • 20,799
  • 66
  • 75
  • 101
The ATLAS CGZ
  • 108
  • 1
  • 1
  • 6
  • thanks for the help but can you tell me that how can i fix the pyaudio problem? – Parth Tomar May 27 '19 at 15:46
  • Unfortunately, PyAudio can't be fixed at the moment... I'll try to upload a working PyAudio to github. I'll post the link as soon as it is available. ;] – The ATLAS CGZ May 28 '19 at 16:22
0

Install Python 3.6 and then download PyAudio, because it's not supported on Python > 3.6 If it's not working, delete your current Python version, later you will download it.

0

Or open cmd.exe and try pip install pipwin and then pipwin install pyaudio