can not install pyaudio

I’m trying to install pyaudio in 3 ways but failed:

Solution 1

pip install pyaudio

of course, it’s not working but worth a try.

Solution 2

pip install pipwin
pipwin install pyaudio

and this is what I got:

Traceback (most recent call last):
  File "C:\Users\Admin\python\Python37\lib\", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Admin\python\Python37\lib\", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Admin\virtualenv\ErzaProject\Scripts\pipwin.exe\", line 7, in <module>
  File "C:\Users\Admin\virtualenv\ErzaProject\lib\site-packages\pipwin\", line 98, in main
  File "C:\Users\Admin\virtualenv\ErzaProject\lib\site-packages\pipwin\", line 300, in install
    wheel_file =
  File "C:\Users\Admin\virtualenv\ErzaProject\lib\site-packages\pipwin\", line 294, in download
    return self._download(requirement, dest)
  File "C:\Users\Admin\virtualenv\ErzaProject\lib\site-packages\pipwin\", line 290, in _download
  File "C:\Users\Admin\virtualenv\ErzaProject\lib\site-packages\pySmartDL\", line 267, in start
    urlObj = urllib.request.urlopen(req, timeout=self.timeout, context=self.context)
  File "C:\Users\Admin\python\Python37\lib\urllib\", line 222, in urlopen
    return, data, timeout)
  File "C:\Users\Admin\python\Python37\lib\urllib\", line 525, in open
    response = self._open(req, data)
  File "C:\Users\Admin\python\Python37\lib\urllib\", line 543, in _open
    '_open', req)
  File "C:\Users\Admin\python\Python37\lib\urllib\", line 503, in _call_chain
    result = func(*args)
  File "C:\Users\Admin\python\Python37\lib\urllib\", line 1360, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "C:\Users\Admin\python\Python37\lib\urllib\", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error timed out>

Solution 3

pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl

and the result:

WARNING: Requirement 'PyAudio-0.2.11-cp36-cp36m-win_amd64.whl' looks like a filename, but the file does not exist
ERROR: PyAudio-0.2.11-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.

I even go to this page directly and got “ERR_CONNECTION_TIMED_OUT” error when clicking on the file.

I just wonder if there is any problem with the main page? Or it’s because of my system? And any way to install pyaudio?

(I’m currently on win10 64bit)

>Solution :

Looking at the pypi files page for PyAudio, the latest wheels are for Python 3.6.
From your traceback it seems like you are running Python 3.7, so that won’t work. The link on the pythonlibs page also times out for me.

If pip cannot find a suitable wheel, it will try to compile the package using its

Nothing for it but to set up a development environment and compile it yourself. This link might help with that.

Leave a Reply