After doing pip install pyaudio, It started collecting the package but suddenly it displayed Following error
This is the error I got in the terminal
PS C:\Users\user> pip install pyaudio
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-rqkofe07\\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-rqkofe07\\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\user\AppData\Local\Temp\pip-record-lmei1_wv\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\appdata\local\programs\python\python39\Include\pyaudio'
cwd: C:\Users\user\AppData\Local\Temp\pip-install-rqkofe07\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-rqkofe07\\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-rqkofe07\\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\user\AppData\Local\Temp\pip-record-lmei1_wv\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\appdata\local\programs\python\python39\Include\pyaudio' Check the logs for full command output.
While the solution by #William will work, I think you should do this instead of installing ~4 gb of programs.
Go here, after that, install a suitable wheel
eg:
The suitable wheel for me is PyAudio-0.2.11-cp39-cp39-win_amd64.whl, as I have python 3.9(cp39) and it is a 64 bit installation(amd64).
After installing it in a directory (say, C:/docs), got to cmd and write
cd C:/docs
pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
This should work
extension error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
The error is in your traceback, you need Microsoft Visual C++.
In order to get C++ on your computer you will need to install Visual Studio using the link in the error code: https://visualstudio.microsoft.com/downloads/
Related
I can access it in the terminal but when I try to add it to my python project in PyCharm it won't let me
I have tried with both python 3.10 and 3.9
it also shows this when i ask for details on why it doesn't work
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: PyAudio
Building wheel for PyAudio (setup.py): started
Building wheel for PyAudio (setup.py): finished with status 'error'
Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
Running setup.py install for PyAudio: started
Running setup.py install for PyAudio: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Lenovo\AppData\Local\Temp\pip-wheel-qtpqe2of'
cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-bl692lay\pyaudio_da329c95486d497b95d33a9225fb1595\
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for PyAudio
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Lenovo\AppData\Local\Temp\pip-record-p3n5y632\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\include\site\python3.10\PyAudio'
cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-bl692lay\pyaudio_da329c95486d497b95d33a9225fb1595\
Complete output (11 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Lenovo\AppData\Local\Temp\pip-record-p3n5y632\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\include\site\python3.10\PyAudio' Check the logs for full command output.
WARNING: You are using pip version 21.1.2; however, version 22.0.3 is available.
You should consider upgrading via the 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\Scripts\python.exe -m pip install --upgrade pip' command.
edit:
now it says:
Command errored out with exit status 1
rather then the warning about c++ visual tools
The error indicates error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/. You should install this to proceed.
I am trying to install the pdftotext library on a Miniconda environment.
After using pip install pdftotext, I am getting an error : Microsoft Visual C++ 14.0 is required
I already have Visual Studio Build Tools 2019 (16.11.8) installed but I still get the same error after restarting and trying the command again.
I tried to use the command conda install -c conda-forge poppler as described here
I also tried the following command : pip install --upgrade setuptools as described in that post
You can read the full log of the error here :
Collecting pdftotext
Using cached pdftotext-2.2.2.tar.gz (113 kB)
Building wheels for collected packages: pdftotext
Building wheel for pdftotext (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\usr\Miniconda3\envs\pdfextract\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\usr\\AppData\\Local\\Temp\\pip-install-vbe_obvm\\pdftotext_0162282ade484d648572906b19b9e0e1\\setup.py'"'"'; __file__='"'"'C:\\Users\\usr\\AppData\\Local\\Temp\\pip-install-vbe_obvm\\pdftotext_0162282ade484d648572906b19b9e0e1\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\usr\AppData\Local\Temp\pip-wheel-ze6zlt7w'
cwd: C:\Users\usr\AppData\Local\Temp\pip-install-vbe_obvm\pdftotext_0162282ade484d648572906b19b9e0e1\
Complete output (11 lines):
WARNING: pkg-config not found--guessing at poppler version.
If the build fails, install pkg-config and try again.
WARNING: pkg-config not found--guessing at poppler version.
If the build fails, install pkg-config and try again.
WARNING: pkg-config not found--guessing at poppler version.
If the build fails, install pkg-config and try again.
running bdist_wheel
running build
running build_ext
building 'pdftotext' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for pdftotext
Running setup.py clean for pdftotext
Failed to build pdftotext
Installing collected packages: pdftotext
Running setup.py install for pdftotext ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\usr\Miniconda3\envs\pdfextract\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\usr\\AppData\\Local\\Temp\\pip-install-vbe_obvm\\pdftotext_0162282ade484d648572906b19b9e0e1\\setup.py'"'"'; __file__='"'"'C:\\Users\\usr\\AppData\\Local\\Temp\\pip-install-vbe_obvm\\pdftotext_0162282ade484d648572906b19b9e0e1\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\usr\AppData\Local\Temp\pip-record-fxlcu60d\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\usr\Miniconda3\envs\pdfextract\Include\pdftotext'
cwd: C:\Users\usr\AppData\Local\Temp\pip-install-vbe_obvm\pdftotext_0162282ade484d648572906b19b9e0e1\
Complete output (11 lines):
WARNING: pkg-config not found--guessing at poppler version.
If the build fails, install pkg-config and try again.
WARNING: pkg-config not found--guessing at poppler version.
If the build fails, install pkg-config and try again.
WARNING: pkg-config not found--guessing at poppler version.
If the build fails, install pkg-config and try again.
running install
running build
running build_ext
building 'pdftotext' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\usr\Miniconda3\envs\pdfextract\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\usr\\AppData\\Local\\Temp\\pip-install-vbe_obvm\\pdftotext_0162282ade484d648572906b19b9e0e1\\setup.py'"'"'; __file__='"'"'C:\\Users\\usr\\AppData\\Local\\Temp\\pip-install-vbe_obvm\\pdftotext_0162282ade484d648572906b19b9e0e1\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\usr\AppData\Local\Temp\pip-record-fxlcu60d\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\usr\Miniconda3\envs\pdfextract\Include\pdftotext' Check the logs for full command output.
I'm open to any suggestion in order to fix this, any help is welcome !
Here is the solution that helped me
conda install -c conda-forge pdftotext
I'm trying to install Odoo v13 dependencies, but it fail with the next error.
pip install -r ..\Odoo\13\odoo\requirements.txt
Seeing this, I tryed to install manually greenlet v0.4.10 (which is the version I need)
And It says that the problem is with Microsoft Visual C++ Build Tools. I tryed to install It and this happends (I reinstalled Microsoft Visual Studio Installer and Microsoft Visual C++ 2015):
pip install greenlet==0.4.0.
It shows me the next output:
Collecting greenlet==0.4.10
Using cached greenlet-0.4.10.zip (82 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for greenlet, since package 'wheel' is not installed.
Installing collected packages: greenlet
Running setup.py install for greenlet ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\aresua\documents\vscodeprojects\odoo-13-addons\.venv\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aresua\\AppData\\Local\\Temp\\pip-install-xxf1xvcp\\greenlet_2223126928944440ab06138578a156c0\\setup.py'"'"'; __file__='"'"'C:\\Users\\aresua\\AppData\\Local\\Temp\\pip-install-xxf1xvcp\\greenlet_2223126928944440ab06138578a156c0\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\aresua\AppData\Local\Temp\pip-record-f2n6j60w\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\aresua\documents\vscodeprojects\odoo-13-addons\.venv\include\site\python3.6\greenlet'
cwd: C:\Users\aresua\AppData\Local\Temp\pip-install-xxf1xvcp\greenlet_2223126928944440ab06138578a156c0\
Complete output (5 lines):
running install
running build
running build_ext
building 'greenlet' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\aresua\documents\vscodeprojects\odoo-13-addons\.venv\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aresua\\AppData\\Local\\Temp\\pip-install-xxf1xvcp\\greenlet_2223126928944440ab06138578a156c0\\setup.py'"'"'; __file__='"'"'C:\\Users\\aresua\\AppData\\Local\\Temp\\pip-install-xxf1xvcp\\greenlet_2223126928944440ab06138578a156c0\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\aresua\AppData\Local\Temp\pip-record-f2n6j60w\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\aresua\documents\vscodeprojects\odoo-13-addons\.venv\include\site\python3.6\greenlet' Check the logs for full command output.
According to this, if you're using Windows, install MS visual C++ with: https://aka.ms/vs/16/release/vs_buildtools.exe
Then restart your PC.
I'm getting an error installing the zbar module. I think the error is related to authorization. How can I solve it?
I wrote pip install zbar.
C:\Users\emiry>pip install zbar
Collecting zbar
Using cached zbar-0.10.zip (31 kB)
Building wheels for collected packages: zbar
Building wheel for zbar (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\emiry\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\emiry\\AppData\\Local\\Temp\\pip-install-6i6ygv4e\\zbar_700c50e90f604c658bec553c6d356553\\setup.py'"'"'; __file__='"'"'C:\\Users\\emiry\\AppData\\Local\\Temp\\pip-install-6i6ygv4e\\zbar_700c50e90f604c658bec553c6d356553\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\emiry\AppData\Local\Temp\pip-wheel-spwm2dxx'
cwd: C:\Users\emiry\AppData\Local\Temp\pip-install-6i6ygv4e\zbar_700c50e90f604c658bec553c6d356553\
Complete output (5 lines):
running bdist_wheel
running build
running build_ext
building 'zbar' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for zbar
Running setup.py clean for zbar
Failed to build zbar
Installing collected packages: zbar
Running setup.py install for zbar ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\emiry\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\emiry\\AppData\\Local\\Temp\\pip-install-6i6ygv4e\\zbar_700c50e90f604c658bec553c6d356553\\setup.py'"'"'; __file__='"'"'C:\\Users\\emiry\\AppData\\Local\\Temp\\pip-install-6i6ygv4e\\zbar_700c50e90f604c658bec553c6d356553\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\emiry\AppData\Local\Temp\pip-record-7pxl18hx\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\emiry\AppData\Local\Programs\Python\Python39\Include\zbar'
cwd: C:\Users\emiry\AppData\Local\Temp\pip-install-6i6ygv4e\zbar_700c50e90f604c658bec553c6d356553\
Complete output (5 lines):
running install
running build
running build_ext
building 'zbar' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\emiry\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\emiry\\AppData\\Local\\Temp\\pip-install-6i6ygv4e\\zbar_700c50e90f604c658bec553c6d356553\\setup.py'"'"'; __file__='"'"'C:\\Users\\emiry\\AppData\\Local\\Temp\\pip-install-6i6ygv4e\\zbar_700c50e90f604c658bec553c6d356553\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\emiry\AppData\Local\Temp\pip-record-7pxl18hx\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\emiry\AppData\Local\Programs\Python\Python39\Include\zbar' Check the logs for full command output.
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the 'C:\Users\emiry\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.
You need to install MS C++ Visual Build tools with Studio. This is link:- https://visualstudio.microsoft.com/vs/older-downloads/
This question already has answers here:
I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?
(17 answers)
Closed 1 year ago.
So, I was looking for some voice recognition project and I need to use the PyAudio lib, but, when installing it in Windows I just receive some erros of installation.
The method of installation that I'm using is:
pip install pyaudio
When I execute the command in cmd the result is:
command: 'c:\users\pedro\virtualenvs\pyjarvis\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pedro\\AppData\\Local\\Temp\\pip-install-tbw4bc33\\pyaudio_3d715acd64eb45979bf989d5585f978d\\setup.py'"'"'; __file__='"'"'C:\\Users\\pedro\\AppData\\Local\\Temp\\pip-install-tbw4bc33\\pyaudio_3d715acd64eb45979bf989d5585f978d\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\pedro\AppData\Local\Temp\pip-wheel-9omziclx'
cwd: C:\Users\pedro\AppData\Local\Temp\pip-install-tbw4bc33\pyaudio_3d715acd64eb45979bf989d5585f978d\
Complete output (9 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for PyAudio
Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
Running setup.py install for PyAudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\pedro\virtualenvs\pyjarvis\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pedro\\AppData\\Local\\Temp\\pip-install-tbw4bc33\\pyaudio_3d715acd64eb45979bf989d5585f978d\\setup.py'"'"'; __file__='"'"'C:\\Users\\pedro\\AppData\\Local\\Temp\\pip-install-tbw4bc33\\pyaudio_3d715acd64eb45979bf989d5585f978d\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\pedro\AppData\Local\Temp\pip-record-mzmmtmwh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\pedro\virtualenvs\pyjarvis\include\site\python3.9\PyAudio'
cwd: C:\Users\pedro\AppData\Local\Temp\pip-install-tbw4bc33\pyaudio_3d715acd64eb45979bf989d5585f978d\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
That's the problem, what should I do?
Though the error says error: Microsoft Visual C++ 14.0 or greater is required. You can try installing the unofficial python binary for pyaudio from here.
Note - Install the wheel package in accordance of your system and python version.
For example if your system is of 64 bit and you running python 3.9.x then you will have to install PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
After you're done with the installation open up your terminal and navigate to the folder where the wheel package is installed, then enter the following command
pip install your_wheel_package_name.whl