It's about a couple of days that the Software Updater won't alert me for updates. This morning I found out that software-properties-gtk crashes repeatedly on system startup and if I try to launch it from the terminal it ends up with the following traceback:

Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 37, in <module>
    from softwareproperties.gtk.SoftwarePropertiesGtk import SoftwarePropertiesGtk
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 54, in <module>
    from UbuntuDrivers import detect
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 21, in <module>
    system_architecture = apt.apt_pkg.get_architectures()[0]
AttributeError: module 'apt' has no attribute 'apt_pkg'

A similar behavior for the update-manager:

Traceback (most recent call last):
  File "/usr/bin/update-manager", line 38, in <module>
    from UpdateManager.UpdateManager import UpdateManager
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 58, in <module>
    from .UpdatesAvailable import UpdatesAvailable
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdatesAvailable.py", line 61, in <module>
    from DistUpgrade.DistUpgradeCache import NotEnoughFreeSpaceError
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeCache.py", line 109, in <module>
    class MyCache(apt.Cache):
AttributeError: module 'apt' has no attribute 'Cache'

So the problem seems to be related to the python apt modules. Nonetheless with either Python 2.7.12 or Python 3.5.2 launched from the terminal, I can execute those commands without any problem, e.g.:

>>> import apt
>>> apt.apt_pkg.get_architectures()[0]

I have also tried to reinstall several apt/python related linux packages together with software-properties-gtk and update-manager. However, with no luck.

The list of (maybe) all the packages I've reinstalled:

apt apt-utils aptdaemon aptdaemon-data update-manager update-manager-core software-properties-gtk dbus python-pkg-resources python3-pkg-resources python-apt python3-apt python-aptdaemon python3-aptdaemon python-apt-common python-aptdaemon.gtk3widgets python3-aptdaemon.gtk3widgets python3-aptdaemon.pkcompat libapt-inst2.0 libapt-pkg5.0

Fortunately the problem affects only the graphical interfaces, i.e. I can upgrade, install or remove ubuntu packages from the terminal through apt, apt-get, aptitude, ... Anyway, it's a bit annoying.

Update: I've also tried (with no luck) to reinstall all the python3 packages previously installed:

sudo apt-get install --reinstall libpeas-1.0-0-python3loader libpython3-stdlib libpython3.5 libpython3.5-minimal libpython3.5-stdlib python3 python3-apport python3-apt python3-aptdaemon python3-aptdaemon.gtk3widgets python3-aptdaemon.pkcompat python3-blinker python3-brlapi python3-bs4 python3-cairo python3-catkin-pkg-modules python3-cffi-backend python3-chardet python3-checkbox-support python3-commandnotfound python3-cryptography python3-cups python3-cupshelpers python3-dateutil python3-dbus python3-dbus.mainloop.qt python3-debian python3-defer python3-distupgrade python3-docutils python3-empy python3-ewmh python3-feedparser python3-gdbm python3-gi python3-gi-cairo python3-guacamole python3-html5lib python3-httplib2 python3-idna python3-jinja2 python3-jwt python3-louis python3-lxml python3-mako python3-markupsafe python3-minimal python3-oauthlib python3-padme python3-pexpect python3-pil python3-pkg-resources python3-plainbox python3-problem-report python3-progressbar python3-ptyprocess python3-pyasn1 python3-pyatspi python3-pycurl python3-pygments python3-pyparsing python3-renderpm python3-reportlab python3-reportlab-accel python3-requests python3-roman python3-ros-buildfarm python3-ros-buildfarm-modules python3-rosdistro-modules python3-rospkg-modules python3-setuptools python3-six python3-software-properties python3-speechd python3-systemd python3-uno python3-update-manager python3-urllib3 python3-xdg python3-xkit python3-xlib python3-xlsxwriter python3-yaml python3.5 python3.5-minimal
  • Hmm, that's an odd one. Can you try to reinstall python-apt and python3-apt by running sudo apt install --reinstall python-apt python3-apt?
    – edwinksl
    Jun 22, 2017 at 13:23
  • @edwinksl already done and still the same. And it works from terminal so maybe the error is somewhere else but the trigger comes from that, mysteriously.
    – alextoind
    Jun 22, 2017 at 13:32

1 Answer 1


I had the same issue. It was related to installing the ROS package python3-ros-buildfarm for pre-release testing. It installs a file /usr/bin/apt.py which I presume is causing this naming conflict. Removing this package resolved the issue for me.

  • 1
    Thank you very much Christian! I was going to open an issue, but I've already found yours, great! ;)
    – alextoind
    Jun 27, 2017 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.