pycairo icon indicating copy to clipboard operation
pycairo copied to clipboard

Install fails with python3.12

Open dagraham opened this issue 1 year ago • 1 comments

Mon 10:37 ~/.config/nvim % pip3.12 install -U pycairo Collecting pycairo Using cached pycairo-1.25.1.tar.gz (347 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 ╰─> [15 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-universal2-cpython-312 creating build/lib.macosx-10.9-universal2-cpython-312/cairo copying cairo/init.py -> build/lib.macosx-10.9-universal2-cpython-312/cairo copying cairo/init.pyi -> build/lib.macosx-10.9-universal2-cpython-312/cairo copying cairo/py.typed -> build/lib.macosx-10.9-universal2-cpython-312/cairo running build_ext Package cairo was not found in the pkg-config search path. Perhaps you should add the directory containing `cairo.pc' to the PKG_CONFIG_PATH environment variable No package 'cairo' found Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1. [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

dagraham avatar Dec 18 '23 15:12 dagraham

I stumbled upon the exact same errors. I solved it on my Ubuntu machine by installing the packages listed here: https://pycairo.readthedocs.io/en/latest/getting_started.html

YpeZ avatar Dec 18 '23 20:12 YpeZ