I’ve not found a solution to this issue, but I thought I should share a workaround in case others encounter this issue. Two workarounds, in fact, but the first one is unsatisfactory in my opinion:
-
Install PyGObject in the virtual environment and disable the File Browser Plugin in gedit, as mentioned in my original post.
-
Install Vext in the virtual environment. It is a Python package, available on PyPI, that makes it possible to access certain system-wide packages from within a virtual environment. In this case, we want to access the system-wide
gipackage, so we installvext.giin the virtual environment:pip3 install vext.giAfter installation, run
vext --check gi.vextto test that theimport gi.repositorystatement works. Seevext --helpfor more options.The miscommunication reported between the Git and the File Browser plugins doesn’t appear to occur when using Vext.