简体   繁体   中英

install the PortAudio Python bindings first and pyaudio

when i run my code in windows 10, I encounter this error

Please build and install the PortAudio Python bindings first.

i install pyaudio but in install pyaudio I faced with this error

ERROR: Complete output from command 'c:\users\epic_r_r\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\Epic_R_R\\AppData\\Local\\Temp\\pip-install-n7_2px9c\\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\Epic_R_R\AppData\Local\Temp\pip-record-klf4pk78\install-record.txt' --single-version-externally-managed --compile:
ERROR: 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": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command "'c:\users\epic_r_r\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\Epic_R_R\\AppData\\Local\\Temp\\pip-install-n7_2px9c\\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\Epic_R_R\AppData\Local\Temp\pip-record-klf4pk78\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Epic_R_R\AppData\Local\Temp\pip-install-n7_2px9c\PyAudio\

I installed it from another way, but I do not think it's installed properly

please help me i really need this

it seems like your package is not installed properly so, first of all, undo all the setup you do try to uninstall and reinstall using pip

python -m pip install pyaudio

or you can try using wheel (click here to get wheel file)

pip install PyAudio-0.2.11-cp37-cp37m-win32.whl

if it is not working then try to install using anaconda

conda install -c anaconda pyaudio 

I was with the same problem, I discovery that PyAudio does not support versions larger than 3.6. You can see the supported versions at this link: PyAudio To solve this problem, I start using python 3.6.8 .

Available to Download from the official Python website.

I hope this helps.

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