The zshell script ran but with errors for images (and markdown etc) complaining it could not find the python command.
./exportnotes.zsh:296: command not found: python
This was because in recent versions of Python installers on macos, python is invoked viapython3, not python.
I've long had an alias python='python3' in my .profile for my bash interactive shell, but of course the alias didn't get inherited by zshell even though it inherited the $PATH environment variable with the correct path/to/python.
Everything worked after I added the alias into a .zshenv file. (Btw, this is better recommendation than editing the .zshrc because the latter files are specific to interactive shells, not zshell scripts invoked from bash or another shell. Placing any aliases in the .zshenv applies to all zshell invocations. Obviously soft-linking python to python3 with ln -s is a good option too; this is all a hangover from when we used to have python 2 and 3 on the same machines...)
Anyway I'd suggest a small revision to the read.me documentation to reflect this and make the installation more interactive shell agnostic. E.g., in the Install Python and Dependencies section:
Note: Python must be on your zshell path, and it is invoked from the exportnotes.zsh script with python and not python3. You may need to alias python='python3' in the ~/.zshenv file, and/or you may need to add the path/to/python to your $PATH variable in the ~/.zshenv file.
I suppose another solution would be to change the zshell script to invoke python via python3 in the now usual fashion. Alternately, you could even check whether the command python exists and alias python as python3 if it does not, e.g:
# Check if 'python' command exists
if ! command -v python &> /dev/null; then
# If 'python' command does not exist, alias it to 'python3'
alias python='python3'
fi
The zshell script ran but with errors for images (and markdown etc) complaining it could not find the python command.
This was because in recent versions of Python installers on macos, python is invoked via
python3, notpython.I've long had an alias
python='python3'in my.profilefor my bash interactive shell, but of course the alias didn't get inherited by zshell even though it inherited the $PATH environment variable with the correct path/to/python.Everything worked after I added the alias into a
.zshenvfile. (Btw, this is better recommendation than editing the.zshrcbecause the latter files are specific to interactive shells, not zshell scripts invoked from bash or another shell. Placing any aliases in the.zshenvapplies to all zshell invocations. Obviously soft-linking python to python3 with ln -s is a good option too; this is all a hangover from when we used to have python 2 and 3 on the same machines...)Anyway I'd suggest a small revision to the read.me documentation to reflect this and make the installation more interactive shell agnostic. E.g., in the Install Python and Dependencies section:
Note: Python must be on your zshell path, and it is invoked from the
exportnotes.zshscript withpythonand notpython3. You may need toalias python='python3'in the~/.zshenvfile, and/or you may need to add the path/to/python to your $PATH variable in the~/.zshenvfile.I suppose another solution would be to change the zshell script to invoke
pythonviapython3in the now usual fashion. Alternately, you could even check whether the commandpythonexists and alias python as python3 if it does not, e.g: