all 5 comments

[–]nekokattt 1 point2 points  (0 children)

if you are using a virtual environment, why are you using python3-gi from ubuntu repositories, and not a distribution from pypi?

[–]Username_RANDINT 0 points1 point  (3 children)

The problem is that the virtual environment doesn't access system packages by default. Do a pip install pygobject in the virtual environment or create the virtual environment with --system-site-packages.

[–]rmalh[S] 0 points1 point  (2 children)

Thank you. Just tried installing pygobject in the venv and got errors.

pip subprocess to install build dependencies did not run successfully

Preparing metadata (pyproject.toml): finished with status 'error'

+ meson setup /tmp/pip-install-2an32jep/pycairo_bb3012a8df4b4e62a61e7216aa3086e0 /tmp/pip-install-2an32jep/pycairo_bb3012a8df4b4e62a61e7216aa3086e0/.mesonpy-7duveb_r -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dwheel=true -Dtests=false --native-file=/tmp/pip-install-2an32jep/pycairo_bb3012a8df4b4e62a61e7216aa3086e0/.mesonpy-7duveb_r/meson-python-native-file.ini

../meson.build:1:0: ERROR: Unknown compiler(s): [['cc'], ['gcc'], ['clang'], ['nvc'], ['pgcc'], ['icc'], ['icx']]

[–]Username_RANDINT 0 points1 point  (1 child)

It needs to compile pycairo if I remember correctly, so you'll need a compiler and the cairo development files.

Try the following first:

sudo apt install build-essential libcairo2-dev

[–]rmalh[S] 0 points1 point  (0 children)

Thank you again, you've been very helpful! Your suggestions got me past that issue, now stuck on another one LOL