Can't install Pyaudio on Command promt - python

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:\python\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ELCOT\\AppData\\Local\\Temp\\pip-install-ypbowjpj\\pyaudio_fe45c014ccaf4316a4461f38a5cc2f44\\setup.py'"'"'; __file__='"'"'C:\\Users\\ELCOT\\AppData\\Local\\Temp\\pip-install-ypbowjpj\\pyaudio_fe45c014ccaf4316a4461f38a5cc2f44\\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\ELCOT\AppData\Local\Temp\pip-record-8pgd4y4k\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\Include\pyaudio'
cwd: C:\Users\ELCOT\AppData\Local\Temp\pip-install-ypbowjpj\pyaudio_fe45c014ccaf4316a4461f38a5cc2f44\
Complete output (17 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
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\python\include -Ic:\python\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\python\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: see previous definition of 'MS_WIN64'
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ELCOT\\AppData\\Local\\Temp\\pip-install-ypbowjpj\\pyaudio_fe45c014ccaf4316a4461f38a5cc2f44\\setup.py'"'"'; __file__='"'"'C:\\Users\\ELCOT\\AppData\\Local\\Temp\\pip-install-ypbowjpj\\pyaudio_fe45c014ccaf4316a4461f38a5cc2f44\\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\ELCOT\AppData\Local\Temp\pip-record-8pgd4y4k\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\Include\pyaudio' Check the logs for full command output.

write :
pip install pipwin
then :
pipwin install pyaudio

Related

Error while installing PyPortfolioOps - qdldl_types - vscode - python

I got an error in pip install PyPortfolioOps on VSCode
I have installed C++ components from VisualBuildTools, re-installed python and vscode
Using legacy 'setup.py install' for qdldl, since package 'wheel' is not installed.
Installing collected packages: qdldl, scs, osqp, ecos, cvxpy, PyPortfolioOpt
Running setup.py install for qdldl ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"'; __file__='"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\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\A.Emad\AppData\Local\Temp\pip-record-ho_kev_6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\Include\qdldl'
cwd: C:\Users\A.Emad\AppData\Local\Temp\pip-install-0mgub_9p\qdldl_6410923930ec4b9f9c018969d6cacaf3\
Complete output (31 lines):
running install
C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
-- Selecting Windows SDK version to target Windows 10.0.19044.
CMake Error at CMakeLists.txt:4 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
See also "C:/Users/A.Emad/AppData/Local/Temp/pip-install-0mgub_9p/qdldl_6410923930ec4b9f9c018969d6cacaf3/c/build/CMakeFiles/CMakeOutput.log". The system cannot find the file specified
CMake Error: Generator: execution of make failed. Make command was: MSBuild.exe qdldlamd.vcxproj /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=14.0 /v:m &&
building 'qdldl' extension
creating build
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\cpp
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic -Ic\qdldl\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\lib\site-packages\pybind11\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\include -IC:\Users\A.Emad\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpcpp\qdldl.cpp /Fobuild\temp.win-amd64-3.10\Release\cpp\qdldl.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
qdldl.cpp
c\qdldl/include/qdldl.h(5): fatal error C1083: Cannot open include file: 'qdldl_types.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe'
failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\setup.py'"'"'; __file__='"'"'C:\\Users\\A.Emad\\AppData\\Local\\Temp\\pip-install-0mgub_9p\\qdldl_6410923930ec4b9f9c018969d6cacaf3\\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\A.Emad\AppData\Local\Temp\pip-record-ho_kev_6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\A.Emad\AppData\Local\Programs\Python\Python310\Include\qdldl' Check the logs for full command output.
I am also cannot install
osqp==0.6.1
cvxpy
Can you please help
It looks like the qdldl does not support python3.10. Could you switch to another python version? Such as python3.9, python3.7.

Trouble with Pyaudio

I am running:
pip install PyAudio
I get this output:
C:\Users\graymouse\PycharmProjects\EmailBot>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\graymouse\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\graymouse\\AppData\\Local\\Temp
\\pip-install-q96wwkqf\\pyaudio_a5b98de520a84c63ad40636eaf059e91\\setup.py'"'"'; __file__='"'"'C:\\Users\\graymouse\\AppData\\Local\\Temp\\pip-install-q96wwkqf\\pyaudio_a5b98de520a84c63ad
40636eaf059e91\\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\graymouse\AppData\Local\Temp\pip-record-064zortn\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\graymouse\app
data\local\programs\python\python39\Include\PyAudio'
cwd: C:\Users\graymouse\AppData\Local\Temp\pip-install-q96wwkqf\pyaudio_a5b98de520a84c63ad40636eaf059e91\
Complete output (17 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
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\users\graymouse\a
ppdata\local\programs\python\python39\include -Ic:\users\graymouse\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools
\MSVC\14.28.29333\include -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.18362.0\cppwinrt /Tcsrc/_
portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\graymouse\appdata\local\programs\python\python39\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: see previous definition of 'MS_WIN64'
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\graymouse\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users
\\graymouse\\AppData\\Local\\Temp\\pip-install-q96wwkqf\\pyaudio_a5b98de520a84c63ad40636eaf059e91\\setup.py'"'"'; __file__='"'"'C:\\Users\\graymouse\\AppData\\Local\\Temp\\pip-install-q96
wwkqf\\pyaudio_a5b98de520a84c63ad40636eaf059e91\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compi
le(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\graymouse\AppData\Local\Temp\pip-record-064zortn\install-record.txt' --single-version-externally-managed --compile --instal
l-headers 'c:\users\graymouse\appdata\local\programs\python\python39\Include\PyAudio' Check the logs for full command output.
Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio and download PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
Then go to the folder where it is downloaded using cd
pip install PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl

"Building wheel for lru-dict" and "Running setup.py install for lru-dict" error

So I'm trying to download a program called TextAttack, which runs on Python, through my Anaconda terminal and I keep getting this error about "Building wheel for lru-dict (setup.py) ... error" and "Running setup.py install for lru-dict ... error". Does anyone know how to fix it?
Building wheels for collected packages: lru-dict
Building wheel for lru-dict (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\mtecl\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\mtecl\AppData\Local\Temp\pip-wheel-fwm92t_z'
cwd: C:\Users\mtecl\AppData\Local\Temp\pip-install-gc4f2zmf\lru-dict\
Complete output (11 lines):
running bdist_wheel
running build
running build_ext
building 'lru' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\mtecl\anaconda3\include -IC:\Users\mtecl\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tclru.c /Fobuild\temp.win-amd64-3.7\Release\lru.obj
lru.c
C:\Users\mtecl\anaconda3\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for lru-dict
Running setup.py clean for lru-dict
Failed to build lru-dict
Installing collected packages: lru-dict, textattack
Running setup.py install for lru-dict ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\mtecl\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\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\mtecl\AppData\Local\Temp\pip-record-uhdfg09i\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\mtecl\anaconda3\Include\lru-dict'
cwd: C:\Users\mtecl\AppData\Local\Temp\pip-install-gc4f2zmf\lru-dict\
Complete output (11 lines):
running install
running build
running build_ext
building 'lru' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\mtecl\anaconda3\include -IC:\Users\mtecl\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tclru.c /Fobuild\temp.win-amd64-3.7\Release\lru.obj
lru.c
C:\Users\mtecl\anaconda3\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\mtecl\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\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\mtecl\AppData\Local\Temp\pip-record-uhdfg09i\install-record.txt' --single-version-externally-managed --compile --install-headers
Thanks
See
Compiling Cython code yields... fatal error C1083: Cannot open include file: 'io.h'
'io.h': No such file or directory during "pip install netifaces"
Cannot open include file: 'io.h': No such file or directory
Originally links are posted by kroitor on https://github.com/ccxt/ccxt/issues/3578#issuecomment-410898645

ERROR: Command errored out with exit status 1:Python 3.8

I was trying
pip install pyaudio
But I got an error
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
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\Admin\PycharmProjects\AI\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pycharm-packaging\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pycharm-packaging\\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\Admin\AppData\Local\Temp\pip-record-9rgu21ro\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Admin\PycharmProjects\AI\venv\include\site\python3.8\pyaudio'
cwd: C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pyaudio\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
copying src\pyaudio.py -> build\lib.win32-3.8
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_portaudio' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Admin\PycharmProjects\AI\venv\include -IC:\Users\Admin\AppData\Local\Programs\Python\Python38-32\include -IC:\Users\Admin\AppData\Local\Programs\Python\Python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-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.18362.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win32-3.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Admin\PycharmProjects\AI\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pyaudio\setup.py'"'"'; file='"'"'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\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\Admin\AppData\Local\Temp\pip-record-9rgu21ro\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Admin\PycharmProjects\AI\venv\include\site\python3.8\pyaudio' Check the logs for full command output.
You must use python versions 2.7, 3.4, 3.6 otherwise there will be an error.supporting python versions
I downloaded this version 'https://www.python.org/downloads/release/python-2717/' of python and it was able to install pyaudio.
pyaudio installed
If you have several versions of Python, then for example to run pip for Python 2.7.17 use this command:
py -2 -m pip install pyaudio
module pyaudio

Intalling pycairo with Python 3.7 on Windows

I'm trying to install pycairo, and in spite of what I found on the Internet, I don't manage to to it
I did pip install pycairo, but it askek me to install Visual Basic Build Tool. I did it but it doesn't work then. I tried a lot of ideas found on the web (e.g. with this website https://www.lfd.uci.edu/~gohlke/pythonlibs/), but it also didn't work.
When I try pip install pycairo, the error message is :
Collecting pycairo
Using cached https://files.pythonhosted.org/packages/48/20/5e83af98eb897935bf7dc39455e892ba866feebb9b7c3b392982866f9958/pycairo-1.18.1.tar.gz
Installing collected packages: pycairo
Running setup.py install for pycairo ... error
ERROR: Command errored out with exit status 1:
command: 'd:\programmes\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Thomas\\AppData\\Local\\Temp\\pip-install-58_68_s2\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\Thomas\\AppData\\Local\\Temp\\pip-install-58_68_s2\\pycairo\\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\Thomas\AppData\Local\Temp\pip-record-6wtp6mn1\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\Thomas\AppData\Local\Temp\pip-install-58_68_s2\pycairo\
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\cairo
copying cairo\__init__.py -> build\lib.win-amd64-3.7\cairo
copying cairo\__init__.pyi -> build\lib.win-amd64-3.7\cairo
copying cairo\py.typed -> build\lib.win-amd64-3.7\cairo
running build_ext
building 'cairo._cairo' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=1 -Id:\programmes\python\include -Id:\programmes\python\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tccairo/device.c /Fobuild\temp.win-amd64-3.7\Release\cairo/device.obj
device.c
C:\Users\Thomas\AppData\Local\Temp\pip-install-58_68_s2\pycairo\cairo\pycairo.h(37): fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'cairo.h'ÿ: No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.21.27702\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\programmes\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Thomas\\AppData\\Local\\Temp\\pip-install-58_68_s2\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\Thomas\\AppData\\Local\\Temp\\pip-install-58_68_s2\\pycairo\\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\Thomas\AppData\Local\Temp\pip-record-6wtp6mn1\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
And I don't understant it !
installing libraries can be a little tough on Windows.
I usually use this website :
https://www.lfd.uci.edu/~gohlke/pythonlibs/
Then, search for your package (here : pycairo‑1.18.1‑cp37‑cp37m‑win_amd64.whl)
Then, you launch cmd in the folder where you downloaded the file, and execute :
pip install pycairo‑1.18.1‑cp37‑cp37m‑win_amd64.whl
I hope this will help you !

Categories

Resources