You can sign up to get a daily email of our articles, see the Mailing List page.
Error processing package duplicity - ConfigParser missing?
Arehandoro Nov 29, 2018
Hello eFriends,

I have a litte -big- issue since I tried to install duplicity in my VM this morning. First a little bit of context, if I'm able to reproduce:

I have a debian 9.6 stable server that acts as kvm. At the moment it only has 2 VMs both with debian 9.6 stable. One for nextcloud+collabora and the other one with emby+transmission.

This week decided I wanted to backup the files to backblaze in case of the server breaking down, hdds, etc, etc.

I installed duplicity first on bare metal, thinking that I might want to send the whole images to the cloud. That went well (sudo apt install duplicity and then upgraded to the version in backports to be able to use it with backblaze), installation progress did not fail or return any errors. Then I realised that sending the whole images from the VMs would be too much of an overkill, that the things that mattered to me weere the files stored, not the vms themselves. So decided to install duplicity in the vm.

And I did so. The only different thing I did this time was: sudo apt install duplicity -t stretch-backports

That returned a whole pile of errors, resulting in this:

dpkg: error processing package duplicity (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-idna
 python-asn1crypto
 python-crypto
 python-blinker
 python-pyasn1
 python-monotonic
 python-wheel
 python-pkg-resources
 python-jwt
 python-keyrings.alt
 python-gi
 python-six
 python-ptyprocess
 python-enum34
 python-lockfile
 python-dbus
 python-ipaddress
 python-pip
 python-xdg
 python-setuptools
 python-urllib3
 duplicity


At the beginning I thought due to the version of python. I changed the version for the current user, via .bashrc with an alias, from 3.5 to 2.7 and logged off/on to see if that could help. No luck.

This is the first time I see this issue so I'm a bit lost. Checked the internet and performed some of the things recommended for this kind of errors:

sudo apt clean
sudo apt autoremove

No luck. Same packages fail when being configured.

Then tried sudo dpkg --configure -a

sudo dpkg --configure -a
Setting up python-idna (2.6-1~bpo9+1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-idna (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-asn1crypto (0.24.0-1~bpo9+1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-asn1crypto (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-crypto (2.6.1-7) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-crypto (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-blinker (1.3.dfsg2-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-blinker (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-pyasn1 (0.1.9-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-pyasn1 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-monotonic (1.1-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-monotonic (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-wheel (0.29.0-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-wheel (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-pkg-resources (33.1.1-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-pkg-resources (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-jwt (1.4.2-1+deb9u1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-jwt (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-keyrings.alt:
 python-keyrings.alt depends on python-crypto; however:
  Package python-crypto is not configured yet.

dpkg: error processing package python-keyrings.alt (--configure):
 dependency problems - leaving unconfigured
Setting up python-gi (3.22.0-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-gi (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-six (1.10.0-3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-six (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-ptyprocess (0.5.1-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-ptyprocess (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-enum34 (1.1.6-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-enum34 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-lockfile (1:0.12.2-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-lockfile (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-dbus (1.2.4-1+b1) ...
Remove stale byte-compiled files...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-dbus (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-ipaddress (1.0.17-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-ipaddress (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-pip (9.0.1-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-pip (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-xdg (0.25-4) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-xdg (--configure):
 subprocess installed post-installation script returned error exit status 1


Whatever that module ConfigParser is, I saw it was changed to configparser in python3.5. I guess when I tried to installed the packages they were trying to find ConfigParser but I was using python3.5 at that time. I don't understand why if I have changed to python2.7 still gets the same error.

I have also tried to delete the packages one by one to not avail. Installing not related packages fail as well now due to those python packages. I'm not sure where else to look or where else to try.

Any ideas?

Apologies if it's something very simple but I don't seem to find the problem anywhere.

Many thanks!
Arehandoro Nov 29, 2018
Ok I was being obnoxious. Setting python2.7 as default in the user wasn't enough. I had to do so at a system level. All soved now!*

* For now anyway xD
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.