python3 No Module Named pyaudio

Asked

Viewed 236 times

0

I’m a beginner in python programming, so I’m getting the error/warning from my cmd

Traceback (most recent call last):
  File "C:\Users\camar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\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 "C:\Users\camar\Documents\omega\main.py", line 5, in <module>
    with sr.Microphone() as s:
  File "C:\Users\camar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\speech_recognition\__init__.py", line 79, in __init__
    self.pyaudio_module = self.get_pyaudio()
  File "C:\Users\camar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\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

someone knows what can be?

  • What version of python do you use? Some libraries do not work in the latest versions. Try running your project with python 3.6 or 3.5

1 answer

1

You came to install the pyaudio?

That one pyaudio is a module, ie a code made by another(s) person(s) that you can include in your project. It does not come by default in Python, so you have to install.

Fortunately, Python has a tool called pip who takes care of the installation and updating of these third-party modules.

Try going in cmd and running the command:

python -m pip install pyaudio

That should install the pyaudio, and then you should be able to rotate.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.