I'm packaging an app I wrote in Python 3 which uses:
from gi.repository import AppIndicator3
As I'm listing the dependencies, I have been unable to determine what package contains AppIndicator3
. I guessed python-appindicator
, but looking at that package it appears that it's for Python 2, not Python 3.
Which package should I depend on?
You're importing from
gi.repository
. The file for this module is:And that file comes from:
So, the package you need (at least on 14.04) is
python3-gi
.I followed the procedure described in muru's answer on Ubuntu 18.04 with GNOME desktop, and got precisely the same output as muru reports for Ubuntu 14.04:
However, in order to run a script containing the line
I had to install not only
python3-gi
but alsolibappindicator3-dev
:For my own indicators, I use
gir1.2-appindicator3-0.1
as dependency. If I recall correctlylibappindicator3-dev
is for development. Either one works in my experience.just open a terminal Ctrl+Alt+T and type
sudo apt-get install gir1.2-appindicator3-0.1
No need to install full development package.
Tested on ubuntu 20.04.
How I arrived at this?
I tried
sudo apt install libappindicator3-dev
and pressed 'n' (not to install). From the package list the first wasgir1.2-appindicator3-0.1
so installed just that.