$PATH未在.bash\u配置文件中设置
我使用MACOS Catalina 10.15.4。我试图在~/.bash_配置文件中设置PATH变量$PATH未在.bash\u配置文件中设置,bash,macos,path,Bash,Macos,Path,我使用MACOS Catalina 10.15.4。我试图在~/.bash_配置文件中设置PATH变量 # Setting PATH for Python 3.7 # The original version is saved in .bash_profile.pysave export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.7/bin" export PATH="$PATH:/Users/some_user/De
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.7/bin"
export PATH="$PATH:/Users/some_user/Desktop/path_to_some_folder/bin"
# added by Anaconda3 2018.12 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"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
我检查了我的路径仅从/etc/path和/etc/path.d设置。
如何确保路径也是从.bash_配置文件设置的
此外,我的主目录中有.bash_profile-anaconda3.bak、.bash_会话和.bash_历史记录(如果有任何区别的话)
编辑:我尝试在.bashrc中导出路径,但也不起作用。正如@chepner所建议的,因为macOS上的所有新帐户现在都使用zsh。我使用.zprofile重新配置了路径 正如@chepner所建议的,因为macOS上的所有新帐户现在都使用zsh。我使用.zprofile重新配置了路径 如果这是一个新帐户,则您运行的不是
bash
,而是zsh
。您应该改为使用.zprofile
。如果这是一个新帐户,则您运行的不是bash
,而是zsh
。您应该改用.zprofile
。
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands