Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

duplicity using python2.7 in bullseye?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
Canuck62
Posts: 15
Joined: 2019-06-25 17:02

duplicity using python2.7 in bullseye?

#1 Post by Canuck62 »

Since upgrading to bullseye, my install of duplicity is generating errors. I have python3-six installed, but duplicity still seems to be looking for python2 which is possibly deprecated in bullseye?

Code: Select all

$ duplicity --version
Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 42, in <module>
    import fasteners
  File "/usr/local/lib/python2.7/dist-packages/fasteners/__init__.py", line 23, in <module>
    from fasteners.lock import locked  # noqa
  File "/usr/local/lib/python2.7/dist-packages/fasteners/lock.py", line 26, in <module>
    import six
ImportError: No module named six
Can anyone help with sorting the config to get duplicity running on bullseye? I have tried installing a few different python packages, but can't get it to work.

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: duplicity using python2.7 in bullseye?

#2 Post by arzgi »

I had no problems at all installing duplicity to bullsey.

Code: Select all

 duplicity --version
duplicity 0.8.17
Also don't see any dependence to python 2.7

Code: Select all

aptitude show duplicity
Paketti: duplicity                         
Versio: 0.8.17-1+b1
Tila: asennettu
Automaattisesti asennettu: ei
Tärkeys: valinnainen
Ryhmä: utils
Vastuuhenkilö: Alexander Zangerl <az@debian.org>
Arkkitehtuuri: amd64
Koko purettuna: 1 803 k
Riippuvuudet: libc6 (>= 2.4), librsync2 (>= 1.0.0), python3 (< 3.10), python3
              (>= 3.9~), python3-fasteners, python3-future, python3:any (>=
              3.7~), python3-lockfile, gnupg | gnupg1
Suosittelut: rsync, python3-paramiko, python3-pexpect, python3-urllib3,
             python3-oauthlib
Ehdotukset: python3-boto, ncftp, lftp, tahoe-lafs, python3-swiftclient,
            python3-pip, par2


What duplicity version you are trying to installl?

Canuck62
Posts: 15
Joined: 2019-06-25 17:02

Re: duplicity using python2.7 in bullseye?

#3 Post by Canuck62 »

It is the version that you have installed, however, there is a conflict - will try removing the i386 version

Code: Select all

$ aptitude show duplicity
Package: duplicity                       
Version: 0.8.17-1+b1
State: installed
Automatically installed: no
Priority: optional
Section: utils
Maintainer: Alexander Zangerl <az@debian.org>
Architecture: amd64
Uncompressed Size: 1,803 k
Depends: libc6 (>= 2.4), librsync2 (>= 1.0.0), python3 (< 3.10), python3 (>= 3.9~), python3-fasteners, python3-future,
         python3:any (>= 3.7~), python3-lockfile, gnupg | gnupg1
Recommends: rsync, python3-paramiko, python3-pexpect, python3-urllib3, python3-oauthlib
Suggests: python3-boto, ncftp, lftp, tahoe-lafs, python3-swiftclient, python3-pip, par2
Conflicts: duplicity:i386
Description: encrypted bandwidth-efficient backup
 Duplicity backs directories by producing encrypted tar-format volumes and uploading them to a remote or local file server.
 Because duplicity uses librsync, the incremental archives are space efficient and only record the parts of files that have
 changed since the last backup. Because duplicity uses GnuPG to encrypt and/or sign these archives, they will be safe from
 spying and/or modification by the server.
Homepage: http://duplicity.nongnu.org/
Tags: admin::backup, implemented-in::python, interface::commandline, role::program, scope::utility, security::cryptography,
      works-with-format::tar, works-with::archive
So I tried to remove duplicity:i386 and it isn't there

Code: Select all

$ sudo apt-get remove duplicity:i386
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'duplicity:i386' is not installed, so not removed. Did you mean 'duplicity'?
The following packages were automatically installed and are no longer required:
  libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
I also autoremoved the suggested packages, but the same fault still recurs

Code: Select all

$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib
0 upgraded, 0 newly installed, 3 to remove and 3 not upgraded.
After this operation, 11.9 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 431038 files and directories currently installed.)
Removing libpython2-stdlib:amd64 (2.7.18-3) ...
Removing libpython2.7-stdlib:amd64 (2.7.18-8) ...
Removing libpython2.7-minimal:amd64 (2.7.18-8) ...

$ duplicity --version
Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 42, in <module>
    import fasteners
  File "/usr/local/lib/python2.7/dist-packages/fasteners/__init__.py", line 23, in <module>
    from fasteners.lock import locked  # noqa
  File "/usr/local/lib/python2.7/dist-packages/fasteners/lock.py", line 26, in <module>
    import six
ImportError: No module named six
I will try the recommended packages - as it turns out, they are already up to date

Code: Select all

$ sudo apt install rsync python3-paramiko python3-pexpect python3-urllib3 python3-oauthlib
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-paramiko is already the newest version (2.7.2-1).
python3-paramiko set to manually installed.
python3-pexpect is already the newest version (4.8.0-2).
python3-pexpect set to manually installed.
python3-oauthlib is already the newest version (3.1.0-2).
python3-oauthlib set to manually installed.
python3-urllib3 is already the newest version (1.26.5-1~exp1).
python3-urllib3 set to manually installed.
rsync is already the newest version (3.2.3-4+deb11u1).
rsync set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

Canuck62
Posts: 15
Joined: 2019-06-25 17:02

Re: duplicity using python2.7 in bullseye?

#4 Post by Canuck62 »

Mystery solved - I removed duplicity, then did which duplicity and discovered one in /usr/local/bin - I must have built a custom package using python2.

I removed /usr/local/bin/duplicity, re-installed duplicity (/usr/bin/duplicity) and back up is now working again.

Thanks for the prompt to check aptitude output - it got me hunting in the right direction

Post Reply