Deja-Dup can not understand duplicity version error

Asked by Richard Jones on 2018-03-29

Latest install of Deja-dup with Ubuntu 16.04 is giving the "can not understand duplicity version" error. Have tried uninstall and restart and install of Deja-Dup to no avail. Search for duplicity in the Ubuntu Software does not result in a match.

Question information

Language:
English Edit question
Status:
Expired
For:
Déjà Dup Edit question
Assignee:
No assignee Edit question
Last query:
2018-04-02
Last reply:
2018-04-18
Manfred Hampl (m-hampl) said : #1

For diagnostic purposes please provide the output of the following commands:

uname -a
lsb_release -crid
apt-cache policy deja-dup duplicity

Richard Jones (richardosj) said : #2

Hello Manfred, thanks for your query. Here is the terminal output from the requested commands:

richardosj@9LQLF61:~$ cd /
richardosj@9LQLF61:/$ uname -a
Linux 9LQLF61 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:22:43 UTC 2018 i686 i686 i686 GNU/Linux
richardosj@9LQLF61:/$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
richardosj@9LQLF61:/$ apt-cache policy deja-dup duplicity
deja-dup:
  Installed: 34.2-0ubuntu1.1
  Candidate: 34.2-0ubuntu1.1
  Version table:
 *** 34.2-0ubuntu1.1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
        100 /var/lib/dpkg/status
     34.2-0ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
duplicity:
  Installed: 0.7.06-2ubuntu2
  Candidate: 0.7.06-2ubuntu2
  Version table:
 *** 0.7.06-2ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status
richardosj@9LQLF61:/$

Manfred Hampl (m-hampl) said : #3

You write "Latest install of Deja-dup".
Did you do some recent updates, or what are you referring to?
There hasn't been any update on deja-dup or duplicity in the past year.

Richard Jones (richardosj) said : #4

Hi Manfred,
Latest version is what I meant. Prior use of the application was normal; recent development was the message concerning duplicity version. If no updates for the past year, then my install of the tool was sometime within the past year since that update. I apologise for the confusion.

Manfred Hampl (m-hampl) said : #5

What output do you receive for the commands

duplicity --version
sudo dpkg --audit

Richard Jones (richardosj) said : #6

richardosj@9LQLF61:~$ duplicity -- version
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 45, in <module>
    from lockfile import LockFile as FileLock
ImportError: No module named lockfile

richardosj@9LQLF61:~$ sudo dpkg --audit
[sudo] password for richardosj:
richardosj@9LQLF61:~$ sudo dpkg --audit
richardosj@9LQLF61:~$

No return data tells me that dpkg is not installed??

Richard

Manfred Hampl (m-hampl) said : #7

1. Execute
sudo apt install --reinstall python-lockfile

and the re-issue the command
duplicity --version

2. No output on "sudo dpkg --audit" tells that there are no broken dependencies or half-installed packages. ("No news is good news.") If the package dpkg were not installed you would have received a "no such file" error message.

Richard Jones (richardosj) said : #8

Hi Manfred!  Good Morning!

Just so I don't annoy you late at night, in what time zone do you reside?

Here's the results of the latest round:

richardosj@9LQLF61:~$ cd /
richardosj@9LQLF61:/$ sudo apt install --reinstall python-lockfile
[sudo] password for richardosj:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not
upgraded.
Need to get 14.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main i386
python-lockfile all 1:0.12.2-1 [14.1 kB]
Fetched 14.1 kB in 0s (117 kB/s)
(Reading database ... 223634 files and directories currently installed.)
Preparing to unpack .../python-lockfile_1%3a0.12.2-1_all.deb ...
Unpacking python-lockfile (1:0.12.2-1) over (1:0.12.2-1) ...
Setting up python-lockfile (1:0.12.2-1) ...
richardosj@9LQLF61:/$ duplicity --version
Traceback (most recent call last):
   File "/usr/bin/duplicity", line 45, in <module>
     from lockfile import LockFile as FileLock
ImportError: No module named lockfile
richardosj@9LQLF61:/$

I'm going to try a computer restart next, then the duplicity --version
command...

Richard

On 04/02/2018 03:09 AM, Manfred Hampl wrote:
> Your question #667337 on Déjà Dup changed:
> https://answers.launchpad.net/deja-dup/+question/667337
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> 1. Execute
> sudo apt install --reinstall python-lockfile
>
> and the re-issue the command
> duplicity --version
>
> 2. No output on "sudo dpkg --audit" tells that there are no broken
> dependencies or half-installed packages. ("No news is good news.") If
> the package dpkg were not installed you would have received a "no such
> file" error message.
>

Richard Jones (richardosj) said : #9

No joy. Here's what transpired:

richardosj@9LQLF61:~$ cd /
richardosj@9LQLF61:/$ duplicity --version
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 45, in <module>
    from lockfile import LockFile as FileLock
ImportError: No module named lockfile
richardosj@9LQLF61:/$ sudo apt install --reinstall python-lockfile
[sudo] password for richardosj:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 14.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main i386 python-lockfile all 1:0.12.2-1 [14.1 kB]
Fetched 14.1 kB in 0s (107 kB/s)
(Reading database ... 223634 files and directories currently installed.)
Preparing to unpack .../python-lockfile_1%3a0.12.2-1_all.deb ...
Unpacking python-lockfile (1:0.12.2-1) over (1:0.12.2-1) ...
Setting up python-lockfile (1:0.12.2-1) ...
richardosj@9LQLF61:/$ duplicity --version
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 45, in <module>
    from lockfile import LockFile as FileLock
ImportError: No module named lockfile

Attempted to do some program refresh:

richardosj@9LQLF61:/$ sudo apt-get install build-dep python
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package build-dep
richardosj@9LQLF61:/$ sudo apt-get install python
Reading package lists... Done
Building dependency tree
Reading state information... Done
python is already the newest version (2.7.12-1~16.04).
python set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
richardosj@9LQLF61:/$ whereis python-lockfile
python-lockfile:
richardosj@9LQLF61:/$ whereis lockfile
lockfile:
richardosj@9LQLF61:/$ whereis python
python: /usr/bin/python3.5 /usr/bin/python2.7 /usr/bin/python3.5m /usr/bin/python /usr/lib/python3.5 /usr/lib/python2.7 /etc/python3.5 /etc/python2.7 /etc/python /usr/local/bin/python3.6m-config /usr/local/bin/python2.7 /usr/local/bin/python3.6 /usr/local/bin/python3.6m /usr/local/bin/python /usr/local/bin/python2.7-config /usr/local/lib/python3.5 /usr/local/lib/python2.7 /usr/local/lib/python3.6 /usr/include/python3.5m /usr/share/python /usr/share/man/man1/python.1.gz
richardosj@9LQLF61:/$ whereis duplicity
duplicity: /usr/bin/duplicity /usr/share/man/man1/duplicity.1.gz
richardosj@9LQLF61:/$ whereis deja-dup
deja-dup: /usr/bin/deja-dup /usr/share/deja-dup /usr/share/man/man1/deja-dup.1.gz
richardosj@9LQLF61:/$

Manfred Hampl (m-hampl) said : #10

(it is afternoon for me)

Next attempt:

Execute
sudo apt install --reinstall python3-lockfile

and the re-issue the command
duplicity --version

Richard Jones (richardosj) said : #11

Ok, here are the results:

richardosj@9LQLF61:~$ cd /
richardosj@9LQLF61:/$ sudo apt install --reinstall python3-lockfile
[sudo] password for richardosj:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
   python-lockfile-doc
The following NEW packages will be installed:
   python3-lockfile
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.2 kB of archives.
After this operation, 63.5 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe i386
python3-lockfile all 1:0.12.2-1 [14.2 kB]
Fetched 14.2 kB in 0s (114 kB/s)
Selecting previously unselected package python3-lockfile.
(Reading database ... 223634 files and directories currently installed.)
Preparing to unpack .../python3-lockfile_1%3a0.12.2-1_all.deb ...
Unpacking python3-lockfile (1:0.12.2-1) ...
Setting up python3-lockfile (1:0.12.2-1) ...
richardosj@9LQLF61:/$ duplicity --version
Traceback (most recent call last):
   File "/usr/bin/duplicity", line 45, in <module>
     from lockfile import LockFile as FileLock
ImportError: No module named lockfile
richardosj@9LQLF61:/$

Is that lockfile not getting placed where duplicity expects?

Richard

On 04/02/2018 10:17 AM, Manfred Hampl wrote:
> Your question #667337 on Déjà Dup changed:
> https://answers.launchpad.net/deja-dup/+question/667337
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> (it is afternoon for me)
>
> Next attempt:
>
> Execute
> sudo apt install --reinstall python3-lockfile
>
> and the re-issue the command
> duplicity --version
>

Manfred Hampl (m-hampl) said : #12

"Is that lockfile not getting placed where duplicity expects?"
A clever question, but not exactly hitting the problem.
Deja-dup is using duplicity, which in turn uses python. And for python there is an add-on for handling lockfiles, but this add-on is not correctly found.

Try the following:

open a terminal and issue the command

python

there will be some information about the python version, and the prompt changes into ">>>".
Type in the python instruction

from lockfile import LockFile

wait for the response (probably failure) and on the next ">>>" prompt type

quit()

This will bring you back to the normal system prompt.
Here please enter the commands

sudo updatedb
locate lockfile

(the first command will run for about a minute and not produce any output)

Finally copy/paste all output back into the question document what we can see the results.

Richard Jones (richardosj) said : #13

OK, here we go:

richardosj@9LQLF61:~$ cd /
richardosj@9LQLF61:/$ python
Python 2.7.13rc1 (default, Jan 28 2018, 21:26:17)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from lockfile import Lockfile
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named lockfile
>>> quit()
richardosj@9LQLF61:/$ sudo updatedb
[sudo] password for richardosj:
richardosj@9LQLF61:/$ locate lockfile
/usr/bin/dotlockfile
/usr/lib/i386-linux-gnu/liblockfile.so.1
/usr/lib/i386-linux-gnu/liblockfile.so.1.0
/usr/lib/python2.7/dist-packages/lockfile
/usr/lib/python2.7/dist-packages/lockfile-0.12.2.egg-info
/usr/lib/python2.7/dist-packages/lockfile/__init__.py
/usr/lib/python2.7/dist-packages/lockfile/__init__.pyc
/usr/lib/python2.7/dist-packages/lockfile/linklockfile.py
/usr/lib/python2.7/dist-packages/lockfile/linklockfile.pyc
/usr/lib/python2.7/dist-packages/lockfile/mkdirlockfile.py
/usr/lib/python2.7/dist-packages/lockfile/mkdirlockfile.pyc
/usr/lib/python2.7/dist-packages/lockfile/pidlockfile.py
/usr/lib/python2.7/dist-packages/lockfile/pidlockfile.pyc
/usr/lib/python2.7/dist-packages/lockfile/sqlitelockfile.py
/usr/lib/python2.7/dist-packages/lockfile/sqlitelockfile.pyc
/usr/lib/python2.7/dist-packages/lockfile/symlinklockfile.py
/usr/lib/python2.7/dist-packages/lockfile/symlinklockfile.pyc
/usr/lib/python2.7/dist-packages/lockfile-0.12.2.egg-info/PKG-INFO
/usr/lib/python2.7/dist-packages/lockfile-0.12.2.egg-info/dependency_links.txt
/usr/lib/python2.7/dist-packages/lockfile-0.12.2.egg-info/not-zip-safe
/usr/lib/python2.7/dist-packages/lockfile-0.12.2.egg-info/pbr.json
/usr/lib/python2.7/dist-packages/lockfile-0.12.2.egg-info/top_level.txt
/usr/lib/python3/dist-packages/lockfile
/usr/lib/python3/dist-packages/lockfile-0.12.2.egg-info
/usr/lib/python3/dist-packages/lockfile/__init__.py
/usr/lib/python3/dist-packages/lockfile/__pycache__
/usr/lib/python3/dist-packages/lockfile/linklockfile.py
/usr/lib/python3/dist-packages/lockfile/mkdirlockfile.py
/usr/lib/python3/dist-packages/lockfile/pidlockfile.py
/usr/lib/python3/dist-packages/lockfile/sqlitelockfile.py
/usr/lib/python3/dist-packages/lockfile/symlinklockfile.py
/usr/lib/python3/dist-packages/lockfile/__pycache__/__init__.cpython-35.pyc
/usr/lib/python3/dist-packages/lockfile/__pycache__/linklockfile.cpython-35.pyc
/usr/lib/python3/dist-packages/lockfile/__pycache__/mkdirlockfile.cpython-35.pyc
/usr/lib/python3/dist-packages/lockfile/__pycache__/pidlockfile.cpython-35.pyc
/usr/lib/python3/dist-packages/lockfile/__pycache__/sqlitelockfile.cpython-35.pyc
/usr/lib/python3/dist-packages/lockfile/__pycache__/symlinklockfile.cpython-35.pyc
/usr/lib/python3/dist-packages/lockfile-0.12.2.egg-info/PKG-INFO
/usr/lib/python3/dist-packages/lockfile-0.12.2.egg-info/dependency_links.txt
/usr/lib/python3/dist-packages/lockfile-0.12.2.egg-info/not-zip-safe
/usr/lib/python3/dist-packages/lockfile-0.12.2.egg-info/pbr.json
/usr/lib/python3/dist-packages/lockfile-0.12.2.egg-info/top_level.txt
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__init__.py
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__pycache__
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/linklockfile.py
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/mkdirlockfile.py
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/pidlockfile.py
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/sqlitelockfile.py
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/symlinklockfile.py
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__pycache__/__init__.cpython-36.pyc
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__pycache__/linklockfile.cpython-36.pyc
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__pycache__/mkdirlockfile.cpython-36.pyc
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__pycache__/pidlockfile.cpython-36.pyc
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__pycache__/sqlitelockfile.cpython-36.pyc
/usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__pycache__/symlinklockfile.cpython-36.pyc
/usr/share/doc/liblockfile-bin
/usr/share/doc/liblockfile1
/usr/share/doc/python-lockfile
/usr/share/doc/python3-lockfile
/usr/share/doc/liblockfile-bin/changelog.Debian.gz
/usr/share/doc/liblockfile-bin/copyright
/usr/share/doc/liblockfile1/changelog.Debian.gz
/usr/share/doc/liblockfile1/copyright
/usr/share/doc/python-lockfile/ACKS
/usr/share/doc/python-lockfile/AUTHORS
/usr/share/doc/python-lockfile/NEWS.Debian.gz
/usr/share/doc/python-lockfile/README.rst
/usr/share/doc/python-lockfile/changelog.Debian.gz
/usr/share/doc/python-lockfile/copyright
/usr/share/doc/python3-lockfile/ACKS
/usr/share/doc/python3-lockfile/AUTHORS
/usr/share/doc/python3-lockfile/NEWS.Debian.gz
/usr/share/doc/python3-lockfile/README.rst
/usr/share/doc/python3-lockfile/changelog.Debian.gz
/usr/share/doc/python3-lockfile/copyright
/usr/share/lintian/overrides/liblockfile-bin
/usr/share/man/man1/dotlockfile.1.gz
/usr/share/man/man3/flockfile.3.gz
/usr/share/man/man3/ftrylockfile.3.gz
/usr/share/man/man3/funlockfile.3.gz
/var/lib/dpkg/info/liblockfile-bin.list
/var/lib/dpkg/info/liblockfile-bin.md5sums
/var/lib/dpkg/info/liblockfile1:i386.list
/var/lib/dpkg/info/liblockfile1:i386.md5sums
/var/lib/dpkg/info/liblockfile1:i386.postinst
/var/lib/dpkg/info/liblockfile1:i386.postrm
/var/lib/dpkg/info/liblockfile1:i386.shlibs
/var/lib/dpkg/info/python-lockfile.list
/var/lib/dpkg/info/python-lockfile.md5sums
/var/lib/dpkg/info/python-lockfile.postinst
/var/lib/dpkg/info/python-lockfile.prerm
/var/lib/dpkg/info/python3-lockfile.list
/var/lib/dpkg/info/python3-lockfile.md5sums
/var/lib/dpkg/info/python3-lockfile.postinst
/var/lib/dpkg/info/python3-lockfile.prerm
richardosj@9LQLF61:/$

Manfred Hampl (m-hampl) said : #14

I have go a suspicion.

In addition to the Ubuntu-provided version of python-lockfile you have also a different version of the python lockfile add-on in /usr/local/lib/python3.6/...

Perhaps this package version does not contain everything what duplicity needs.

What is the output of

tail /usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__init__.py

and what is the output of

strace duplicity --version 2>&1 | grep -i lockfile | grep -v ENOENT

By the way:
Please also execute the command

sudo apt-get purge python3-lockfile

to undo the addition that did not help.

Manfred Hampl (m-hampl) said : #15

(typo: I have got a suspicion)

Richard Jones (richardosj) said : #16

OK, here we go. Note there were a couple of typos and had to re-try the commands...

richardosj@9LQLF61:/$ sudo apt-get purge python3-lockfile
[sudo] password for richardosj:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  python3-lockfile*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 63.5 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 223652 files and directories currently installed.)
Removing python3-lockfile (1:0.12.2-1) ...
richardosj@9LQLF61:/$ tail /usr/local/lib/python3.6/site-packages/pip/_vendor/lockfile/__init__.py

if hasattr(os, "link"):
    from . import linklockfile as _llf
    LockFile = _llf.LinkLockFile
else:
    from . import mkdirlockfile as _mlf
    LockFile = _mlf.MkdirLockFile

FileLock = LockFile
richardosj@9LQLF61:/$ strace duplicity --version 2>&l | grep -i lockfile | grep -v EN0ENT
bash: l: ambiguous redirect
richardosj@9LQLF61:/$ strace duplicity --version 2>&l | grep -i lockfile | grep -v ENOENT
bash: l: ambiguous redirect
richardosj@9LQLF61:/$ strace duplicity --version 2>&1 | grep -i lockfile | grep -v ENOENT
write(2, "from lockfile import LockFile as"..., 42from lockfile import LockFile as FileLock
write(2, "No module named lockfile", 24No module named lockfile) = 24
richardosj@9LQLF61:/$

Manfred Hampl (m-hampl) said : #17

Ok, seems that I am wrong. The snippet from the foreign "lockfile" looks exactly the same as the Ubuntu version, and contains LockFIle. So this seems not to be the culprit.

And the trace from your system looks completely different from mine.

Please provide the output that you receive for

strace duplicity --version 2>&1 | grep -i lockfile

Richard Jones (richardosj) said : #18

richardosj@9LQLF61:~$ cd /
richardosj@9LQLF61:/$ strace duplicity --version 2>&1 | grep -i lockfile
stat64("/usr/bin/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/bin/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/bin/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/bin/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/bin/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/plat-linux2/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/plat-linux2/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/plat-linux2/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/plat-linux2/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/plat-linux2/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/lib-tk/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-tk/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-tk/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-tk/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-tk/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/lib-dynload/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-dynload/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-dynload/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-dynload/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-dynload/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/site-packages/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/site-packages/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/site-packages/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/site-packages/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/site-packages/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/bin/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/bin/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/bin/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/bin/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/plat-linux2/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/plat-linux2/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/plat-linux2/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/plat-linux2/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/plat-linux2/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/lib-tk/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-tk/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-tk/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-tk/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-tk/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/lib-dynload/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-dynload/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-dynload/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-dynload/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/lib-dynload/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/python2.7/site-packages/lockfile", 0xbf9cbb0c) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/site-packages/lockfile.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/site-packages/lockfilemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/site-packages/lockfile.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/site-packages/lockfile.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
write(2, "from lockfile import LockFile as"..., 42from lockfile import LockFile as FileLock
write(2, "No module named lockfile", 24No module named lockfile) = 24
richardosj@9LQLF61:/$

Manfred Hampl (m-hampl) said : #19

Ok,

Python on your system does not search for modules in /usr/lib/python2.7/... but only in /usr/local/lib/python2.7/...

To confirm this please do the following:

open a terminal window, issue the command

python

and on the ">>>" prompt of python issue the python instructions

import sys
print sys.path
quit()

and finally copy/paste the output as before.

I just re-read on of your previous outputs and it shows that you are not using the Ubuntu-provided version of Python (2.7.12) but something different (2.7.13)

Please also add the output that you receive for the commands

ls -l `which python`
ls -l `which python2.7`

Richard Jones (richardosj) said : #20

Hi Manfred, had a little trouble with those commands as described. Tried to interpret what was requested by modifications as shown:

richardosj@9LQLF61:~$ python
Python 2.7.13rc1 (default, Jan 28 2018, 21:26:17)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages']
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>> quit()
richardosj@9LQLF61:~$ cd /
richardosj@9LQLF61:/$ ls -l 'which python'
ls: cannot access 'which python': No such file or directory
richardosj@9LQLF61:/$ ls -l 'which python2.7'
ls: cannot access 'which python2.7': No such file or directory
richardosj@9LQLF61:/$ which python
/usr/local/bin/python
richardosj@9LQLF61:/$ which python2.7
/usr/local/bin/python2.7
richardosj@9LQLF61:/$ cd /usr/local/bin
richardosj@9LQLF61:/usr/local/bin$ ls -l python
lrwxrwxrwx 1 root root 7 Jan 28 21:31 python -> python2
richardosj@9LQLF61:/usr/local/bin$ ls -l python2.7
-rwxr-xr-x 1 root root 6046692 Jan 28 21:30 python2.7
richardosj@9LQLF61:/usr/local/bin$

Richard Jones (richardosj) said : #21

and just a little bit more...

richardosj@9LQLF61:~$ cd /
richardosj@9LQLF61:/$ which python2
/usr/local/bin/python2
richardosj@9LQLF61:/$ cd /usr/local/bin
richardosj@9LQLF61:/usr/local/bin$ ls -l python2
lrwxrwxrwx 1 root root 9 Jan 28 21:31 python2 -> python2.7
richardosj@9LQLF61:/usr/local/bin$

Manfred Hampl (m-hampl) said : #22

Sorry that I did not warn you, there are back ticks `
Why didn't you use copy/paste?

In any case the root cause of your problem:

You are not using the Ubuntu-provided python program in /usr/bin/python, but a version form somewhere else in /usr/local/bin/python, and apparently this other version is selected because of PATH settings.

This foreign version does not find the Ubuntu-provided add-ons which are needed for duplicity.

I see two options for you:
1. go back to the Ubuntu-provided version of python (e.g. by removing the other one)
or
2. try adding all required add-ons to your python version (perhaps something like "sudo pip install lockfile")

Richard Jones (richardosj) said : #23

Sorry about that...

As to the fix, going back to Ubuntu version of python would involve removing the link entries as well as the python2.7 version?
I seem to recall that I went looking for python and loaded it from the Python website. Which add-ons should i look for?

Richard Jones (richardosj) said : #24

Manfred, I will be away until late Tuesday morning Eastern US time. Best regards.

Richard

Launchpad Janitor (janitor) said : #25

This question was expired because it remained in the 'Open' state without activity for the last 15 days.