1

I've got a backup script that utilizes duplicity to upload to Dropbox. It's erroring out because the dropbox-python-sdk version required, 6.9.0, uses the keyword async which is now reserved in python3. I have both python3 and python2.7 installed on my system, but duplicity is automatically using python3. How can I configure my system, this script, or duplicity, to specifically run python2.7 (in this case, /usr/bin/pthyon)?

4
  • Are you using an old version? All those projects currently support python 3.x
    – jordanm
    Jul 24, 2020 at 19:29
  • I'm using duplicity 0.8.12, which told me that I need dropbox-python-sdk 6.9.0 when I tried to run a Dropbox command. Jul 24, 2020 at 19:39
  • 1
    probably dropbox-sdk v6.9+ is needed? how about trying latest version dropbox-sdk v10.x (pypi.org/project/dropbox/#history)? and of course you can still prepend duplicity with a specific python interpreter eg. python2.7 duplicity ... Jul 26, 2020 at 10:38
  • @ede aha! That could do the trick, will give it a try. Aug 5, 2020 at 13:49

1 Answer 1

0

I don't know duplicity but if it's only 1 script or a combination of a tiny number of scripts then changing #!/usr/bn/python to #!/usr/bin/python3 on the 1st line of the script should do the trick.

Otherwise you can change the symlink /usr/bin/python points to. On most distro's there is a 'clean' way to do this but the following will work everywhere:
sudo ln -sf $(which python3) /usr/bin/python

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .