答案1
根据python3-gi-cairo
包裹的描述(apt show python3-gi-cairo
)...
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the Python 3 Cairo bindings for GObject. It is mostly
used by other bindings to map their GObjects to Python objects.
这是该包的描述python3-cairo
(apt show python3-cairo
)...
This package contains modules that allow you to use the Cairo vector
graphics library in Python3 programs.
因此,第二个(python3-cairo
)就是您想要的包。
话虽如此,维护者建议pycairo
您通过以下方式安装它pip
对于 Ubuntu/Debian,他们说要安装标题和pkg-config
$ sudo apt install libcairo2-dev pkg-config python3-dev
然后安装pip3
包
$ pip3 install pycairo