I keep getting this while trying to install PyGObject for Python 3.7 in Pycharm. I at first got the error where cl.exe couldn't be found, but I did some research and would that apparently C++ toolkit was missing even though I could locate cl.exe. I reinstalled pip, toolkit, and added cl.exe to PATH, and this new error came up:
ERROR: Command errored out with exit status 1
Command:
Collecting PyGObject
Using cached PyGObject-3.36.0.tar.gz (714 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Latitude\PycharmProjects\ESC190\project_scheduler\venv\Scripts\python.exe'
'C:\Users\Latitude\PycharmProjects\ESC190\project_scheduler\venv\lib\site-packages\pip' install --
ignore-installed --no-user --prefix 'C:\Users\Latitude\AppData\Local\Temp\pip-build-env-
gv8msoqy\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i
https://pypi.org/simple -- setuptools wheel pycairo
cwd: None
Complete output (35 lines):
Collecting setuptools
Using cached setuptools-46.1.3-py3-none-any.whl (582 kB)
Collecting wheel
Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Collecting pycairo
Using cached pycairo-1.19.1.tar.gz (205 kB)
Installing collected packages: setuptools, wheel, pycairo
Running setup.py install for pycairo: started
Running setup.py install for pycairo: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Latitude\PycharmProjects\ESC190\project_scheduler\venv\Scripts\python.exe' -u -
c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Latitude\\AppData\\Local\\Temp\\pip-install-i870hprp\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\Latitude\\AppData\\Local\\Temp\\pip-install-i870hprp\\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\Latitude\AppData\Local\Temp\pip-record-si_3ert2\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\Latitude\AppData\Local\Temp\pip-build-env-gv8msoqy\overlay' --compile --install-headers 'C:\Users\Latitude\PycharmProjects\ESC190\project_scheduler\venv\include\site\python3.7\pycairo'
cwd: C:\Users\Latitude\AppData\Local\Temp\pip-install-i870hprp\pycairo\
Complete output (20 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
warning: build_py: byte-compiling is disabled, skipping.
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\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL
/DNDEBUG /MT -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -
IC:\Users\Latitude\PycharmProjects\ESC190\project_scheduler\venv\include -IC:\Users\Latitude\AppData\Local\Programs\Python\Python37\include -IC:\Users\Latitude\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\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.18362.0\cppwinrt" /Tccairo/device.c /Fobuild\temp.win-amd64-3.7\Release\cairo/device.obj
device.c
C:\Users\Latitude\AppData\Local\Temp\pip-install-i870hprp\pycairo\cairo\pycairo.h(37): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Latitude\PycharmProjects\ESC190\project_scheduler\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Latitude\\AppData\\Local\\Temp\\pip-install-i870hprp\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\Latitude\\AppData\\Local\\Temp\\pip-install-i870hprp\\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\Latitude\AppData\Local\Temp\pip-record-si_3ert2\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\Latitude\AppData\Local\Temp\pip-build-env-gv8msoqy\overlay' --compile --install-headers 'C:\Users\Latitude\PycharmProjects\ESC190\project_scheduler\venv\include\site\python3.7\pycairo' Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1:
'C:\Users\Latitude\PycharmProjects\ESC190\project_scheduler\venv\Scripts\python.exe'
'C:\Users\Latitude\PycharmProjects\ESC190\project_scheduler\venv\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Latitude\AppData\Local\Temp\pip-build-env-gv8msoqy\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo Check the logs for full command output.
I was getting same error while installing pywhatkit. I used pip install --upgrade pip setuptools wheel --user first then installed pywhatkit using command pip install pywhatkit and it worked.
delete windows temp files and add this argument to the end of the install command --no-cache-dir
if it didn't work try to install tokenize module first
Related
I know there are lots of issues about installing ta-lib. I tried some but not working. Example i tried :
https://www.youtube.com/watch?v=hZIZMMcTQ8c&ab_channel=MartinMayer
https://pypi.org/project/TA-Lib/
For the first, i have this environment :
Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] on win32
I dll that : TA_Lib-0.4.22-cp39-cp39-win32 here (https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib)
And this is the issue :
C:\Users\****>pip3 install TA_Lib-0.4.22-cp39-cp39-win32
ERROR: Could not find a version that satisfies the requirement TA_Lib-0.4.22-cp39-cp39-win32 (from versions: none)
ERROR: No matching distribution found for TA_Lib-0.4.22-cp39-cp39-win32
(i tried with win64 too).
And with the second solution, i dll the zip and unzipped at C:, i opened visual studio prompt command and tried the command "nmake" but nothing is working
EDIT for comment :
C:\Users\bapti>pip install TA-lib
Collecting TA-lib
Downloading TA-Lib-0.4.23.tar.gz (269 kB)
|████████████████████████████████| 269 kB 3.2 MB/s
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\bapti\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from TA-lib) (1.21.4)
Using legacy 'setup.py install' for TA-lib, since package 'wheel' is not installed.
Installing collected packages: TA-lib
Running setup.py install for TA-lib ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\bapti\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bapti\\AppData\\Local\\Temp\\pip-install-4qndp13d\\ta-lib_891a0e91e37348bb9618707395c37102\\setup.py'"'"'; __file__='"'"'C:\\Users\\bapti\\AppData\\Local\\Temp\\pip-install-4qndp13d\\ta-lib_891a0e91e37348bb9618707395c37102\\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\bapti\AppData\Local\Temp\pip-record-m24m3ndf\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\bapti\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\TA-lib'
cwd: C:\Users\bapti\AppData\Local\Temp\pip-install-4qndp13d\ta-lib_891a0e91e37348bb9618707395c37102\
Complete output (27 lines):
C:\Users\bapti\AppData\Local\Temp\pip-install-4qndp13d\ta-lib_891a0e91e37348bb9618707395c37102\setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail.
warnings.warn('Cannot find ta-lib library, installation may fail.')
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\talib
copying talib\abstract.py -> build\lib.win-amd64-3.9\talib
copying talib\deprecated.py -> build\lib.win-amd64-3.9\talib
copying talib\stream.py -> build\lib.win-amd64-3.9\talib
copying talib\test_abstract.py -> build\lib.win-amd64-3.9\talib
copying talib\test_data.py -> build\lib.win-amd64-3.9\talib
copying talib\test_func.py -> build\lib.win-amd64-3.9\talib
copying talib\test_pandas.py -> build\lib.win-amd64-3.9\talib
copying talib\test_polars.py -> build\lib.win-amd64-3.9\talib
copying talib\test_stream.py -> build\lib.win-amd64-3.9\talib
copying talib\__init__.py -> build\lib.win-amd64-3.9\talib
running build_ext
building 'talib._ta_lib' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\talib
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\ta-lib\c\include -IC:\Users\bapti\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\numpy\core\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\ATLMFC\include -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\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 /Tctalib/_ta_lib.c /Fobuild\temp.win-amd64-3.9\Release\talib/_ta_lib.obj
_ta_lib.c
talib/_ta_lib.c(680): fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'ta_libc.h'ÿ: No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\bapti\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bapti\\AppData\\Local\\Temp\\pip-install-4qndp13d\\ta-lib_891a0e91e37348bb9618707395c37102\\setup.py'"'"'; __file__='"'"'C:\\Users\\bapti\\AppData\\Local\\Temp\\pip-install-4qndp13d\\ta-lib_891a0e91e37348bb9618707395c37102\\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\bapti\AppData\Local\Temp\pip-record-m24m3ndf\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\bapti\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\TA-lib' Check the logs for full command output.
pip3 install wheel
Then you need to download relevant TA-Lib districution from here https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib, probably TA_Lib‑0.4.24‑cp39‑cp39‑win_amd64.whl,
then
pip3 install TA_Lib‑0.4.24‑cp39‑cp39‑win_amd64.whl
Solution for MAC OS
Install Homebrew from APP STORE
Restart your PC
On terminal
export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include"
export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib"
on terminal type and execute
brew install talib (or) arch -arm64 brew install ta-lib (For M1)
Restart your PC again
check installation by typing >>Import talib on python3 terminal
check version >>talib.version
5.if not displayed try once reinstalling using pip install ta-lib
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
I am trying to install 'IfxPy' package using pip command on Git-Bash but getting below error. Tried adding wheel to. Still unable to install.
$ pip3 install ifxpy
Collecting ifxpy
Using cached IfxPy-3.0.5.tar.gz (155 kB)
Building wheels for collected packages: ifxpy
Building wheel for ifxpy (setup.py): started
Building wheel for ifxpy (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\gsampath\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gsampath\\AppData\\Local\\Temp\\pip-install-d9wyx3hw\\ifxpy_28fd8dfdd9ff4259b237248d082433ad\\setup.py'"'"'; __file__='"'"'C:\\Users\\gsampath\\AppData\\Local\\Temp\\pip-install-d9wyx3hw\\ifxpy_28fd8dfdd9ff4259b237248d082433ad\\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\gsampath\AppData\Local\Temp\pip-wheel-3jsyuxx7
.
.
.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\gsampath\AppData\Local\Temp\pip-install-d9wyx3hw\ifxpy_28fd8dfdd9ff4259b237248d082433ad\libs /LIBPATH:C:CSDK\lib /LIBPATH:c:\users\gsampath\appdata\local\programs\python\python38-32\libs /LIBPATH:c:\users\gsampath\appdata\local\programs\python\python38-32\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86" iclit09b.lib /EXPORT:PyInit_IfxPy build\temp.win32-3.8\Release\ifxpyc.obj /OUT:build\lib.win32-3.8\IfxPy.cp38-win32.pyd /IMPLIB:build\temp.win32-3.8\Release\IfxPy.cp38-win32.lib
LINK : fatal error LNK1181: cannot open input file 'iclit09b.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1181
It seems that no wheel is available for this package and it has an underlying dependency, hence pip will try to build it in your system.
I searched the missing lib in the Installation and got the following entry:
IBM iclit09b.lib reference
You may found other ways of installing it, but you first need the low level library prior to installing the Python wrapper around it.
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
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 !