reportlab 4.0 install error (pycairo)

542 views
Skip to first unread message

Daniel J Kapner

unread,
May 4, 2023, 3:32:38 PM5/4/23
to reportlab-users
repro:

> conda create -n test37 python=3.7
> conda activate test37
> pip install reportlab
...
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-37
      creating build/lib.linux-x86_64-cpython-37/cairo
      copying cairo/__init__.py -> build/lib.linux-x86_64-cpython-37/cairo
      copying cairo/__init__.pyi -> build/lib.linux-x86_64-cpython-37/cairo
      copying cairo/py.typed -> build/lib.linux-x86_64-cpython-37/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

Same for python 3.8 as well.

Colin 't Hart

unread,
May 5, 2023, 10:06:24 AM5/5/23
to reportlab-users
You need to install a bunch of dependencies. On Ubuntu/Debian at least the following:
apt install build-essential pkg-config python3-dev libcairo2-dev

/Colin

Reply all
Reply to author
Forward
0 new messages