pygobject / pycairo

Python bindings for cairo
https://pycairo.readthedocs.io
Other
620 stars 85 forks source link

Help Failed building wheel for pycairo #326

Closed venkataraja705 closed 1 year ago

venkataraja705 commented 1 year ago

os: Ubunutu python 3.10

when i try to install pycairo in mu ubunutu machine i was getting error as the Building Wheel Fail

Issue:

Collecting pycairo Using cached pycairo-1.24.0.tar.gz (344 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: pycairo Building wheel for pycairo (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for pycairo (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [12 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/cairo copying cairo/init.py -> build/lib.linux-x86_64-cpython-310/cairo copying cairo/init.pyi -> build/lib.linux-x86_64-cpython-310/cairo copying cairo/py.typed -> build/lib.linux-x86_64-cpython-310/cairo running build_ext 'pkg-config' not found. Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10'] [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pycairo Failed to build pycairo

ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

venkataraja705 commented 1 year ago

is the pycairo supports for the Linux distros?

hs1white commented 1 year ago

Your issue has the hint: 'pkg-config' not found.

Here are the docs: https://pycairo.readthedocs.io/en/latest/getting_started.html

For Ubuntu it says the reqs are:

sudo apt install libcairo2-dev pkg-config python3-dev