简体   繁体   中英

Not able to install pyaudio python module

I can't install Pyaudio in my python 3.10.1. using pip install pipwin then pipwin install pyaudio .

Error:

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>pipwin install pyaudio
Package `pyaudio` found in cache
Downloading package . . .
https://download.lfd.uci.edu/pythonlibs/y2rycu7g/PyAudio-0.2.11-cp310-cp310-win_amd64.whl
PyAudio-0.2.11-cp310-cp310-win_amd64.whl
Traceback (most recent call last):
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\Scripts\pipwin.exe\__main__.py", line 7, in <module>
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\site-packages\pipwin\command.py", line 103, in main
    cache.install(package)
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\site-packages\pipwin\pipwin.py", line 300, in install
    wheel_file = self.download(requirement)
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\site-packages\pipwin\pipwin.py", line 294, in download
    return self._download(requirement, dest)
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\site-packages\pipwin\pipwin.py", line 290, in _download
    obj.start()
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\site-packages\pySmartDL\pySmartDL.py", line 267, in start
    urlObj = urllib.request.urlopen(req, timeout=self.timeout, context=self.context)
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 525, in open
    response = meth(req, response)
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 634, in http_response
    response = self.parent.error(
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 563, in error
    return self._call_chain(*args)
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Users\ayamk\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

You are getting urllib.error.HTTPError: HTTP Error 404: Not Found

the .whl for pyaudio is not available at the URL pipwin is trying to download it from

Try doing pipwin refresh before doing the installation

see this github issue

Alternatively, You can download the .whl directly from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio and do

pip install <path-to-downloaded-whl>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM