Python3: Namespace AppIndicator3 not available (original) (raw)
OS: Kubuntu 18.04
I have a Python program (program.py) that has this at the beginning:
import shlex
import sys
import notify2
import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
gi.require_version("AppIndicator3", "0.1")
from gi.repository import AppIndicator3
When I run it, this is what happens:
$ python3 /path/to/program.py
Traceback (most recent call last):
File "/path/to/program.py", line 34, in <module>
gi.require_version('AppIndicator3', '0.1')
File "/home/linuxbrew/.linuxbrew/Cellar/python@3.8/3.8.5/lib/python3.8/site-packages/gi/__init__.py", line 129, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace AppIndicator3 not available
The following shows the Python modules I have:
$ brew uninstall python3
Error: Refusing to uninstall /home/linuxbrew/.linuxbrew/Cellar/python@3.8/3.8.5
because it is required by at-spi2-atk, at-spi2-core, atk, cairo, docbook, docbook-xsl, enchant, freeglut, gdk-pixbuf, glib, glu, gobject-introspection, graphviz, gsettings-desktop-schemas, gtk+3, gtksourceview3, gts, harfbuzz, httpd, imagemagick, itstool, libepoxy, libheif, liblqr, libva-internal, libxml2, libxslt, llvm, mesa, meson, netpbm, pango, php, php-cs-fixer, pipenv, py3cairo, pyenv, pygobject3, shared-mime-info, vala, wayland and xmlto, which are currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies python3
Any clue to what might be causing this?