pyGObject installation error
Asked Answered
Q

0

6

I accidentally deleted 'pyGObject' package from python3.6 interpreter. After trying to reinstall I get the following error message.

C:\WINDOWS\system32>pip install pygobject
Collecting pygobject
  Using cached PyGObject-3.28.2.tar.gz
Collecting pycairo>=1.11.1 (from pygobject)
  Using cached pycairo-1.16.3.tar.gz
Building wheels for collected packages: pygobject, pycairo
  Running setup.py bdist_wheel for pygobject ... error
  Complete output from command "c:\program files\python\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\ISHARA~1\\AppData\\Local\\Temp\\pip-build-c0j2dbt2\\pygobject\\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 
  . 
  .
  .
  copying gi\overrides\__init__.py -> build\lib.win-amd64-3.6\gi\overrides
  running build_ext
  pycairo: new API
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\ISHARA~1\AppData\Local\Temp\pip-build-c0j2dbt2\pygobject\setup.py", line 840, in <module>
      main()
    .
    .
    .
    File "C:\Users\ISHARA~1\AppData\Local\Temp\pip-build-c0j2dbt2\pygobject\setup.py", line 532, in find_new_api
      import cairo
  ModuleNotFoundError: No module named 'cairo'

  ----------------------------------------
  Failed building wheel for pygobject
  .
  .
  .
  c:\users\ishara madhawa\appdata\local\temp\pip-build-c0j2dbt2\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 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

    .
    .
    .
    creating build\temp.win-amd64-3.6\Release\cairo
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=16 -DPYCAIRO_VERSION_MICRO=3 "-Ic:\program files\python\python36\include" "-Ic:\program files\python\python36\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /Tccairo/device.c /Fobuild\temp.win-amd64-3.6\Release\cairo/device.obj
    device.c
    c:\users\ishara madhawa\appdata\local\temp\pip-build-c0j2dbt2\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 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command ""c:\program files\python\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\ISHARA~1\\AppData\\Local\\Temp\\pip-build-c0j2dbt2\\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\ISHARA~1\AppData\Local\Temp\pip-qffygonq-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ISHARA~1\AppData\Local\Temp\pip-build-c0j2dbt2\pycairo\

Please can any one help me to sort out this error?

Quantize answered 5/4, 2018 at 16:16 Comment(2)
I'm having the same error. I get ImportError: /home/jhbuild/install/lib/python3.5/site-packages/cairo/_cairo.cpython-35m-x86_64-linux-gnu.so: undefined symbol: cairo_tee_surface_index ---------------------------------------- Failed building wheel for pygobject Any luck?Dailey
No I couldn't find an answer. so I gave up 'pyGObject' and made UIs using pyQT5Quantize

© 2022 - 2024 — McMap. All rights reserved.