Tryton requires pygtkcompat, but OS doesn't provide it

I just tried the following on OpenSuse Tumbleweed with Gnome, and it doesn’t seem to have pygtkcompat.

$ pip install --user tryton
Collecting tryton
  Downloading tryton-6.0.8-py3-none-any.whl (596 kB)
     |████████████████████████████████| 596 kB 636 kB/s 
Requirement already satisfied: python-dateutil in /usr/lib/python3.8/site-packages (from tryton) (2.8.2)
Requirement already satisfied: PyGObject in /usr/lib64/python3.8/site-packages (from tryton) (3.42.0)
Requirement already satisfied: pycairo in /usr/lib64/python3.8/site-packages (from tryton) (1.20.1)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.8/site-packages (from python-dateutil->tryton) (1.16.0)
Installing collected packages: tryton
Successfully installed tryton-6.0.8

$ .local/bin/tryton

Tryton starts, but upon login in, I still get:

ModuleNotFoundError: No module named 'pygtkcompat'

According to · master · GNOME / pygobject · GitLab, it is still included in pygobject.

I did read through the other threads on the pygtkcompat, but regardless of maintainability, being supported or not, I can’t run Tryton either from source or by installing with pip.

What is the solution?

First you should complaint to OpenSUSE to explicitly remove some standard features of a package (which is not only for backward compatibility).
Now tryton needs only pygtkcompat.generictreemodel (in tryton/gui/window/view_form/view/
So you could copy the in this folder and replace the line:

from pygtkcompat.generictreemodel import GenericTreeModel


from .generictreemodel import GenericTreeModel

…or just review the prior discussions on that, this should answer it.

@fmorato - why dont you just use the tryton-packages in Application:ERP:Tryton:6.0 ?
(OK, I have not announced its availability…but from the link on one should get there)

Thanks for both answers. I can see from the OpenSuse Tryton repo that they are manually adding generictreemodel to the Tryton package.

Adding the repo for Tryton 6.0 and installing the Tryton package.

# zypper ar -f Tryton
# zypper in tryton

It’s nice to have it installed as a system package ^^

On a side note, I guess reading the threads and no mention of the repo, I totally forgot about the repository links on the website.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.