Reputation: 451
I am trying to follow along with a book that for some of the chapters requires the line
export PATH="$PATH:$HOME/scripts"
be added to a .bash_profiles
in the home directory. Probably, after peaking later in the book it is to launch scripts located in that folder quickly from the terminal without specification of path of that file, it seems useful so I would like to do it.
Although, since I have previously installed conda
on my mac, it apparently changed something and addition of that line did not alter the output of echo $PATH
.bash_profiles
looks now like this:
# added by Anaconda3 2019.10 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/eshauchuk/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/Users/eshauchuk/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/eshauchuk/opt/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
\export PATH="$PATH:$HOME/scripts"
else
\export PATH="/Users/eshauchuk/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
export PATH="$PATH:$HOME/scripts"
# <<< conda init <<<
I have added the mentioned line to the near end of the .bash_profile
now and also went to the found in this files conda files to try add it there with no change for now.
What can I do to make it work
Upvotes: 0
Views: 657
Reputation: 1668
Check this comment:
# !! Contents within this block are managed by 'conda init' !!
So try to put your line after the block like this:
# <<< conda init <<<
export PATH="$PATH:$HOME/scripts"
Upvotes: 3