Post Reply 
Need assistance - zsh on Mac to run pyILPer
12-09-2019, 09:03 PM (This post was last modified: 12-09-2019 09:36 PM by Sylvain Cote.)
Post: #3
RE: Need assistance - zsh on Mac to run pyILPer
Starting with macOS 10.15 (Catalina) Apple changed the shell from bash to zsh. This mean that the configurations filenames has changed.

Configuration files for bash (Bourne Again Shell) are
  • System files: /etc/profile & /etc/bashrc.
  • User files: ~/.bash_profile, ~/.bash_login, ~/.profile & ~/.bashrc.
Configuration files for zsh (Z Shell) are:
  • System files: /etc/zshenv, /etc/zprofile, /etc/zshrc, /etc/zlogin & /etc/zlogout.
  • User files: ~/.zshenv, ~/.zprofile, ~/.zshrc, ~/.zlogin & ~/.zlogout.
Note: ~ mean your home folder in macOS/Unix/BSD/Linux. (macOS: /Users/YOUR_USER_NAME/)

For some reason Anaconda is still updating one of the bash configuration files (~/.bash_profile or ~/.profile) instead of one of the zsh configurations files (~/.zprofile)

What you need to do is copy the configuration data from the bash configuration file to the zsh configuration file.

The configuration section to copy should look like the following:
Code:
# added by Anaconda3 YYYY.MM installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/YOUR_USER_NAME/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/Users/YOUR_USER_NAME/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/YOUR_USER_NAME/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/Users/YOUR_USER_NAME/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<
Note 1: scrolling is needed to completely see the above section
Note 2: do not forget to replace YOUR_USER_NAME by your actual home folder name
Note 3: you will need to start a new shell to apply the updated configuration
Note 4: to see the new configuration, from the command line type: export [RETURN] // you should see the string /Users/YOUR_USER_NAME/anaconda3/bin in your path variable

Sylvain
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Need assistance - zsh on Mac to run pyILPer - Sylvain Cote - 12-09-2019 09:03 PM



User(s) browsing this thread: 2 Guest(s)