【发布时间】:2020-08-19 03:19:25
【问题描述】:
我正在尝试跟随一本在某些章节中需要一行的书
export PATH="$PATH:$HOME/scripts"
被添加到主目录中的.bash_profiles。可能,在本书的后期达到顶峰之后,它是从终端快速启动位于该文件夹中的脚本而无需指定该文件的路径,这似乎很有用,所以我想这样做。
虽然,由于我之前在我的 mac 上安装了 conda,它显然改变了一些东西,并且添加该行并没有改变 echo $PATH 的输出
.bash_profiles 现在看起来像这样:
# 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 <<<
我现在已将提到的行添加到.bash_profile 的近端,并且还转到此文件中的 conda 文件尝试将其添加到那里,暂时没有更改。
我该怎么做才能让它发挥作用
【问题讨论】: