Unable to Install Daml SDK

If you want to do said clean-up, first, make a backup of your current files, in case I made a silly typo in the following that will break everything:

$ cp ~/.zshrc ~/Desktop/zshrc_backup
$ cp ~/.zprofile ~/Desktop/zprofile_backup

Then, you can type:

$ open -a TextEdit $HOME/.zshrc

in a Terminal, which will open your ~/.zshrc in the TextEdit graphical application. You can then replace all of its contents with the following:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/stevenscarpati/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/stevenscarpati/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/stevenscarpati/opt/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/stevenscarpati/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

export PATH="/opt/homebrew/bin:$PATH"

# possible fix for command not found; compdef
autoload -Uz compinit && compinit

# Load Angular CLI autocompletion
source <(ng completion script)

# old zprofile
export PATH="/Library/Frameworks/Python.framework/Versions/3.11/bin:$PATH"
export JAVA_HOME="$(/usr/libexec/java_home)"
export PATH="$HOME/.daml/bin:$PATH"

Note that, barring me typoing, the file should be unchanged until the <<< conda initialize <<< line.

The compdef: command not found message likely comes from the Angular completion attempt with the line:

source <(ng completion script)

The easiest way to remove the warning is to comment out (or remove) that line. If you want to try to make it work, though, there is a Stack Overflow question about exactly that case, which seems to suggest a fix (which I’ve included above).

Once you’ve copied the above into your ~/.zshrc, it includes everything you currently have in your ~/.zprofile` so you can remove that one with

$ rm ~/.zprofile

Hope that helps.

1 Like