3

The default backup app doesn't work properly.

I searched in the web and my Anaconda2 seems to be the problem but I still want it as my primary Python.

If I run in the console:

duplicity --version

The output is:

File "/usr/bin/duplicity", line 61, in <module>
    from duplicity import log
ImportError: No module named duplicity

How can I fix it and still use Anaconda2 as my primary python shell?

  • @alfred-m It would be useful to know what version of duplicity you have installed. since duplicity --version isn't working, the command dpkg -l duplicity can usually provide the same information. – Elder Geek Oct 15 '17 at 15:14
  • Actually with recent updates it seems to work. – Adrian Martinez Oct 16 '17 at 02:06
  • dpkg -l duplicity would return this: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= un duplicity <none> <none> (no description available) – Adrian Martinez Oct 16 '17 at 02:07
  • after do apt-get install duplicity, duplicity --version return this: duplicity 0.7.06

    It seems that the updates fixed the problem, but anyways, I tried to update and reinstall duplicity before and didn't work like now.

    – Adrian Martinez Oct 16 '17 at 02:10
  • I run dplicity 0.7.06 and still get this error. – M. Toya Oct 16 '17 at 06:41
  • Add the contents of /usr/bin/duplicity to your question, please. – Fabby Oct 16 '17 at 22:45

1 Answers1

3

duplicity is a Python script that lives at /usr/bin/duplicity and the error given indicates a problem at line 61 of the script. Opening it in your favorite text editor and navigating down to line 61 might provide some clues. I'm running duplicity 0.6.23 on Ubuntu 14.04.5 LTS and duplicity 0.7.06 on Ubuntu 16.04.3 and in both cases line 61 of the script is blank and I cannot reproduce this error.

It's possible that you can simply edit the script to resolve the problem, commenting out line 61, or re-installing duplicity, however if Duplicity and Anaconda clash is an accurate assessment of the problem you could run duplicity under a different account and insure that the path for that account includes /usr/bin BEFORE your Anaconda folder. More details on account specific $PATH adjustment can be found in the answers here.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183