pythonmacospython-2.7duplicityduplicity-backup

Duplicity on macos not working, getting: env: python2: No such file or directory


I'm trying to run duplicity on macos and I'm getting this error:

env: python2: No such file or directory

IMHO there is a link missing between python2 and python2.7 but I'm not sure

Is it safe to create a link from /usr/bin/python2 to /usr/bin/python for fixing this? Or would it be better to change duplicity to use /usr/bin/python?


Solution

  • You can create a symlink, but it is better to create it in /usr/local/bin/ or somewhere else where your normal user account has access, rather than globally in /usr/bin/ (which requires root access to modify).

    Personally, I find if your install brew and Python from brew, not only do you get the latest Python builds, but it also manages these path problems for you.

    Read more about brew at https://brew.sh/