A year or two ago I learned a bit of Python then rolled up my sleeves and attempted to write my own booking software. After a few restarts I settled with using gtk and it was all plain sailing. Then I got bored and stopped.
Now I’m back (with a fresh install of Leap 15.5) and trying to pick up where I left off, except I can’t get my old code to work. The code is fine… it’s VSCode and a crucial module, gi. Evey time I try to run it I get “ModuleNotFoundError: No module named 'gi”.
How do I install gi? (!!)
I originally used an virtual environment to try to stop something like this from happening but I must have used the environment incorrectly. Besides, I coded it with Python 3.6 and VSCode now only supports 3.7+.
I created a new environment with Python 3.11. Somewhere on my travels I read that it’s PyGObject that I need but I’ve tried installing that, and pgi and no joy. I found this page and followed the steps inside and outside the environment and no joy.
https://pygobject.readthedocs.io/en/latest/getting_started.html#opensuse-getting-started
I’ve just deleted the new environment I created and started fresh so in a new Python 3.11 virtual environment what do I have to do to get these two lines to work as they should?
import gi
gi.require_version('Gtk', '3.0')
Thank you!