Im getting below error when installing PyGObject using pip on windows python version 2.7.18
pip install PyGObject
ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\test\appdata\local\temp\pip-build-env-9
qeux4\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):
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support
for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting setuptools
Using cached setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting pycairo
Using cached pycairo-1.18.2.tar.gz (200 kB)
Using legacy 'setup.py install' for pycairo, since package 'wheel' is not installed.
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:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\test\\appdata\\local\\temp\\pip-install-cp90gz\\pycairo\
\setup.py'"'"'; __file__='"'"'c:\\users\\test\\appdata\\local\\temp\\pip-install-cp90gz\\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\test\appdata\local\temp\pip-record-n
nbplv\install-record.txt' --single-version-externally-managed --prefix 'c:\users\test\appdata\local\temp\pip-build-env-9qeux4\overlay' --compile --install-headers 'c:\u
sers\test\appdata\local\temp\pip-build-env-9qeux4\overlay\Include\pycairo'
cwd: c:\users\test\appdata\local\temp\pip-install-cp90gz\pycairo\
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\cairo
copying cairo\__init__.py -> build\lib.win-amd64-2.7\cairo
copying cairo\__init__.pyi -> build\lib.win-amd64-2.7\cairo
copying cairo\py.typed -> build\lib.win-amd64-2.7\cairo
running build_ext
building 'cairo._cairo' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\cairo
C:\Users\test\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYCAIRO_VERSION_MAJOR=1
-DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=2 -Ic:\python27\include -Ic:\python27\PC /Tccairo/device.c /Fobuild\temp.win-amd64-2.7\Release\cairo/device.obj
device.c
c:\users\test\appdata\local\temp\pip-install-cp90gz\pycairo\cairo\pycairo.h(37) : fatal error C1083: Cannot open include file: 'cairo.h': No such file or director
y
error: command 'C:\\Users\\test\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\test\\appdata\\local\\t
emp\\pip-install-cp90gz\\pycairo\\setup.py'"'"'; __file__='"'"'c:\\users\\test\\appdata\\local\\temp\\pip-install-cp90gz\\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\tes
t\appdata\local\temp\pip-record-nnbplv\install-record.txt' --single-version-externally-managed --prefix 'c:\users\test\appdata\local\temp\pip-build-env-9qeux4\overlay'
--compile --install-headers 'c:\users\test\appdata\local\temp\pip-build-env-9qeux4\overlay\Include\pycairo' Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\test
\appdata\local\temp\pip-build-env-9qeux4\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simplehttps://pypi.org/simple -- setuptools wheel pycai
ro Check the logs for full command output.