简体   繁体   中英

Failed to install PyGObject with Python3.6 in Raspberry Pi 3

I've manually installed Python3.6 in Raspberry Pi3. I'm trying to install PyGObject which fails with the error:


ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f4i084p_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools wheel pycairo
       cwd: None
  Complete output (36 lines):
  Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
  Collecting setuptools
    Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)
  Collecting wheel
    Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
  Collecting pycairo
    Downloading pycairo-1.20.0.tar.gz (344 kB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  Building wheels for collected packages: pycairo
    Building wheel for pycairo (PEP 517): started
    Building wheel for pycairo (PEP 517): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpazwu2ueb
         cwd: /tmp/pip-install-k30bx276/pycairo
    Complete output (12 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.6
    creating build/lib.linux-armv7l-3.6/cairo
    copying cairo/__init__.py -> build/lib.linux-armv7l-3.6/cairo
    copying cairo/__init__.pyi -> build/lib.linux-armv7l-3.6/cairo
    copying cairo/py.typed -> build/lib.linux-armv7l-3.6/cairo
    running build_ext
    Requested 'cairo >= 1.15.10' but version of cairo is 1.14.8
    Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
    ----------------------------------------
    ERROR: Failed building wheel for pycairo
  Failed to build pycairo
  ERROR: Could not build wheels for pycairo which use PEP 517 and cannot be installed directly
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f4i084p_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools wheel pycairo Check the logs for full command output.

As per my understanding, the failure occurs while building PyCairo-1.20.0 which needs cairo >= 1.15.10' but version of cairo is 1.14.8.

Possible solution:

pycairo-1.20.0 is a recent release (5 Oct 2020). If the build uses pycairo-1.19.1, I believe the installation will succeed as it needs cairo >= 1.13.1.

So, my question is:

  1. Disregarding my "possible solution", is there any way to install PyGObject using pip3 for python3.6 in Raspberry Pi 3?
  2. With respect to my "possible solution", how to install PyGObject that uses PyCairo-1.19.1 ?

The command I executed is:

sudo PYGOBJECT_WITHOUT_PYCAIRO=1 pip3 install --no-build-isolation --no-use-pep517 pygobject

which installs PyGObject without installing PyCairo.

https://github.com/pygobject/pycairo/issues/219

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM