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

I’m trying to install Tryton on a Mac M2 (I think this causes the problem!) with pip command.
“python -m pip install trytond” this is OK
“python -m pip install tryton” i get the following mistakes:


Collecting PyGObject>=3.19 (from tryton)
Using cached PyGObject-3.46.0.tar.gz (723 kB)
Installing build dependencies … error
error: subprocess-exited-with-error


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
[end of output]

i need to overcome this problem because I can’t add new modules!

Installing the tryton client with pip can be challenging because it depends on GTK and many libraries.
It is probably easier to use the pre-build client from Tryton - Get Tryton
Otherwise you will need to install the binary dependencies from GTK. The simplest way for me is to use https://brew.sh/.

Thank you very much.

After many unsuccessful attempts, he decided to work with Tryton SAO, but now I have a permit problem and I don’t know if it’s because of directory permits or NGINX permits

I had a very similar problem on debian a few days ago.

Digging in the log I saw that I had to manually install libgirepository1.0-dev (that’s debian specific, but maybe it can point you in the right direction)

After that the build got further, but still failed, and this time it was not a missing dependency.

As I’m on sid (the development version of debian), I decided to wait in case an ongoing transition caused the problem. And the next day a bunch of updated gtk/gnome packages came in (adwaita, libglib2.0, libpangomm,…), which solved the problem for me.

Of course, this is debian specific, but maybe something similar is happening on your system.

HTH,
Rémi