cairocffi
cairocffi copied to clipboard
It looks like your cairocffi was not built with xcffib support
Hello,
Trying to install Qtile window manager on a "RPI 4 buster lite", I got the following error in Qtile build with cairocffi-1.2.0 installed with pip
:
It looks like your cairocffi was not built with xcffib support. To fix this:
- Ensure a recent xcffib is installed (pip install 'xcffib>=0.5.0')
- The pip cache is cleared (remove ~/.cache/pip, if it exists)
- Reinstall cairocffi, either:
pip install --no-deps --ignore-installed cairocffi
or
pip uninstall cairocffi && pip install cairocffi
----------------------------------------
Failed building wheel for qtile
If I uninstall cairocffi installed from pip
to use the debian package via:
pip3 uninstall cairocffi
sudo apt install python3-cairocffi
The 0.7.2
cairocffi version is installed on the system and Qtile builds correctly.
In my tests the python3-cairocffi
package installation did not add any missing dependencies. So it seems all required debian packages dependencies were satisfied before 'cairocffi' install via 'pip'.
Does something changed with xcffib support ? Or is it mandatory to use cairocffi
from a distribution package ? Does we need another debian package headers dependencies to build ?
Thanks you guys for your replies
Does something changed with xcffib support ?
CairoCFFI 0.7.2 has been released in 2015, a lot of things changed…
If you want to install CairoCFFI with XCB support, you have to use pip install cairocffi[xcb]
. It will install xcffib. That’s probably what’s missing for qtile.
Or is it mandatory to use
cairocffi
from a distribution package ?
No, it’s not. Installing with pip should just work.
So it seems all required debian packages dependencies were satisfied before 'cairocffi' install via 'pip'.
Maybe a more recent version of xcffib is required with recent versions of CairoCFFI (I don’t remember).
I'm having this issue currently and I'm not sure how to resolve it.
I've tried uninstalling and reinstalling cairocffi([xcb]) multiple times. I've uninstalled the ubuntu python3-* packages that relate to this. I've tried building and installing cairocffi locally, but nothing works.
Just to make sure this is a qtile error, is there a way to check if cairocffi is built with xcffib support?
I tried running the code qtile runs to check if cairocffi has xcffib support and sure enough, it causes an AttributeError
.
I also tested some other functions names from https://github.com/Kozea/cairocffi/blob/e17b48840eab93682a551b1c4e346f6abdfdd15f/cairocffi/constants.py and none of them exists. But the basic example works, so I am very confused at the moment.
Looking into the /usr/lib/x86_64-linux-gnu/libcairo.so.2
, it contains the cairo_xcb_surface_create
, despite the following code
from cairocffi import cairo
cairo.cairo_xcb_surface_create
throwing AttributeError: cffi library 'libcairo.so.2' has no function, constant or global variable named 'cairo_xcb_surface_create'
.
I fixed it by manually running cairocffi/ffi_build.py
according to this comment and then installing qtile from PyPI. If i tried to install it from a cloned repo I get the error that cairocffi was not built with xcb support. I will open a separate issue in qtile about that.