Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Anaconda安装在Mac OS X上修改.bash_配置文件_Bash_Macos_Anaconda_Conda - Fatal编程技术网

Anaconda安装在Mac OS X上修改.bash_配置文件

Anaconda安装在Mac OS X上修改.bash_配置文件,bash,macos,anaconda,conda,Bash,Macos,Anaconda,Conda,我在我的Mac(Mojave)上安装了Anaconda,现在每当我启动shell时,它就会自动激活conda环境。在我意识到.bashrc中的一些命令在启动时没有被执行之前,这一切都很好。特别是,我增加了HISTSIZE和HISTFILESIZE,但它们似乎总是停留在默认值500。通过谷歌搜索,我了解到,由于安装了anaconda,启动时使用的是我的.bash_配置文件,而不是.bashrc。这就是我的.bash_配置文件的样子(见下文),只需将我的.bashrc文件中的命令(例如,HISTFI

我在我的Mac(Mojave)上安装了Anaconda,现在每当我启动shell时,它就会自动激活conda环境。在我意识到.bashrc中的一些命令在启动时没有被执行之前,这一切都很好。特别是,我增加了HISTSIZE和HISTFILESIZE,但它们似乎总是停留在默认值500。通过谷歌搜索,我了解到,由于安装了anaconda,启动时使用的是我的.bash_配置文件,而不是.bashrc。这就是我的.bash_配置文件的样子(见下文),只需将我的.bashrc文件中的命令(例如,HISTFILESIZE=100000)添加到我的.bash_配置文件的顶部,似乎什么也做不了。对我做错了什么有什么建议吗?谢谢

# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
# added by Anaconda3 2019.07 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
# . "/anaconda3/etc/profile.d/conda.sh"  # commented out by conda initialize
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('//anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "//anaconda3/etc/profile.d/conda.sh" ]; then
        . "//anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="//anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
#设置Python 3.7的路径
#原始版本保存在.bash_profile.pysave中
PATH=“/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}”
导出路径
#由Anaconda3 2019.07安装程序添加
#>>>康达初始化>>>
# !! 此块中的内容由“conda init”管理!!
__conda_setup=“$(conda_报告_错误=false'/anaconda3/bin/conda'shell.bash hook 2>/dev/null)”
如果[$?-等式0];然后
\评估“$\uuu conda\u设置”
其他的
如果[-f”/anaconda3/etc/profile.d/conda.sh“;然后
# . “/anaconda3/etc/profile.d/conda.sh”#由conda initialize注释掉
CONDA_CHANGEPS1=假CONDA激活基
其他的
\导出路径=“/anaconda3/bin:$PATH”
fi
fi
未设置条件设置
# >>
# !! 此块中的内容由“conda init”管理!!
__conda_setup=“$”('//anaconda3/bin/conda''shell.bash''hook'2>/dev/null)
如果[$?-等式0];然后
评估“$\uuu conda\u设置”
其他的
如果[-f”//anaconda3/etc/profile.d/conda.sh”];然后
. “//anaconda3/etc/profile.d/conda.sh”
其他的
导出路径=“//anaconda3/bin:$PATH”
fi
fi
未设置条件设置

#您可以尝试按照建议在bash_概要文件中添加以下行:

if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi