Я совершенно новичок в python и bash. Я удалил Anaconda, используя conda clean, и удалил .anaconda_backup
в моем домашнем каталоге. Я открыл .bash_profile
и увидел export PATH="/Users/XXXXX/anaconda3/bin:$PATH"
и несколько других добавленных экземпляров $PATH
.
Мой .bash_profile
# added by Anaconda3 5.3.1 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/XXXXXXXXXX/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/Users/XXXXXXXXXX/anaconda3/etc/profile.d/conda.sh" ]; then
# . "/Users/XXXXXXXXXX/anaconda3/etc/profile.d/conda.sh" # commented out by conda initialize
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/Users/XXXXXXXXXX/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
##
# Your previous /Users/XXXXXXXXXX/.bash_profile file was backed up as /Users/XXXXXXXXXX/.bash_profile.macports-saved_2019-01-19_at_19:04:16
##
# MacPorts Installer addition on 2019-01-19_at_19:04:16: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
# added by Anaconda3 2019.10 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/XXXXXXXXXX/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/Users/XXXXXXXXXX/opt/anaconda3/etc/profile.d/conda.sh" ]; then
# . "/Users/XXXXXXXXXX/opt/anaconda3/etc/profile.d/conda.sh" # commented out by conda initialize
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/Users/XXXXXXXXXX/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
Однако на самом деле я не понял части, касающейся удаления пути Anaconda из .bash_profile
, приведенной в руководстве. Я снова запустил echo $ PATH после удаления Anaconda, и он выглядит точно так же, как раньше, когда у меня была Anaconda. /opt/anaconda3/bin:/Users/XXXXX/opt/anaconda3/bin:/opt/local/bin:/opt/local/sbin:/Users/XXXXX/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Я планирую установить миниконду и создать среду для изучения науки о данных. Я пытаюсь заставить себя все больше и больше знакомиться с терминалом
Все еще безопасно go вперед и установить Miniconda? Как удалить путь Anaconda из .bash_profile
? Смогу ли я по-прежнему открывать python, просто набрав команду python? или мне нужно было бы добавить другой путь для доступа к python после установки python через миниконду?