Why I get error when I try to install pyaudio?

Herossandro

The first error whas Microsoft Visual C++ 14.0 is not installed and I fixed it... Now when I try to install pyaudio I get another error. (I've Windows 10)

I've installed all visual studio's packages... I tried also to use wheel installation but it says that wheel is not supported on this platform

Collecting pyaudio
  Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
  Running setup.py install for pyaudio ... error
    Complete output from command C:\Users\Hp\PycharmProjects\Jarvis\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Hp\\AppData\\Local\\Temp\\pip-install-r8s
c6ih0\\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\AppDa
ta\Local\Temp\pip-record-zm1aoh_y\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Hp\PycharmProjects\Jarvis\venv\include\site\python3.7\pyaudio:
    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
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Users\Hp\PycharmPro
jects\Jarvis\venv\include -IC:\Users\Hp\AppData\Local\Programs\Python\Python37\include -IC:\Users\Hp\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visua
l Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\include" "-IC:\Program Files (
x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC
:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.1
8362.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.7\Release\src/_portaudiomodule.obj
    _portaudiomodule.c
    C:\Users\Hp\AppData\Local\Programs\Python\Python37\include\pyconfig.h(117): warning C4005: 'MS_WIN64': ridefinizione macro
    src/_portaudiomodule.c: note: vedere la precedente definizione di 'MS_WIN64'
    src/_portaudiomodule.c(29): fatal error C1083: Non Š possibile aprire il file inclusione: 'portaudio.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
FlyingTeller

From the official docs:

To build PyAudio from source, you will also need to build PortAudio v19

That being said and seeing your error message: 'portaudio.h': No such file or directory error, I think you have not installed this dependency.

The key part here is that PyAudio only provides python bindings to the Portaudio library, but does not include the library itself, unless you install using a .whl, but these are not available for python 3.7. Again, from the docs (emphasis mine):

pip will fetch and install PyAudio wheels (prepackaged binaries). Currently, there are wheels compatible with the official distributions of Python 2.7, 3.4, 3.5, and 3.6. For those versions, both 32-bit and 64-bit wheels are available.

So your solution is to either download and install the missing library, or move to a python version for which there are pre built wheels that include Portaudio

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Why do I get permission denied when I try use "make" to install something?

Why do I get an error for "__CrtGetFileInformationByHandleEx " when I try to compile

Why do I get an "invalid values" error when I try to access the network settings on Eclipse Mars?

Why I get error when I try to create stored procedure?

Why do I get an error when I try to add a dependent task to one created by the C plugin?

I get an error when I try to install my project packages with npm i

How do I get a better error message when I try to pip install with an incompatible python version?

Why I get error when try append element to document?

Why Do I get an error when I try to get tkinter slider value?

React App: Why I get an error when I try to run npm start script?

I get and error when I try to do pip install

Error: When I try to install any package

Why do I get this error when I run 'bower install'?

Why do I get error when I try to alert the length of the passed array to the function?

Error I get when I try install IDE Anjuta

Why I obtain these error messages when I try to install gem bundler on Ubuntu? (Could not create Makefile)

Why I obtain these error messages when I try to install gem bundler on Ubuntu? (Could not create Makefile)

Display error when i try to composer install

I get this error when I try to install

Why I obtain these error messages when I try to install gem bundler on Ubuntu? (Could not create Makefile)

Why do I get 'undefined' error when I try to read session atrribute from Controller

NGINX is giving error when i try to install

Why do I get a NoClassDefFound error when I try to save my test plan?

Install scrapy ERROR - When I try to install scrapy I get the following error that I do not know how to fix it:

Why I get error when I try to declare local variable?

Why do I get an error when I try to see my Text using useState?

Why I get an error when I try to upload a picture

Why do I get error when try to convert Carbon to DateTime?

Why I get error when try build image in docker?

TOP Ranking

HotTag

Archive