Created
December 10, 2019 01:33
-
-
Save nygeog/c9f9662718d5ac857808301f933de584 to your computer and use it in GitHub Desktop.
Bash Profile Question on how to make Alias for Anaconda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# added by Anaconda3 2019.10 installer | |
# >>> conda init >>> | |
# !! Contents within this block are managed by 'conda init' !! | |
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/{...username...}/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)" | |
if [ $? -eq 0 ]; then | |
\eval "$__conda_setup" | |
else | |
if [ -f "/Users/{...username...}/opt/anaconda3/etc/profile.d/conda.sh" ]; then | |
. "/Users/{...username...}/opt/anaconda3/etc/profile.d/conda.sh" | |
CONDA_CHANGEPS1=false conda activate base | |
else | |
\export PATH="/Users/{...username...}/opt/anaconda3/bin:$PATH" | |
fi | |
fi | |
unset __conda_setup | |
# <<< conda init <<< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From this, https://stackoverflow.com/questions/24664435/use-default-python-rather-than-anaconda-installation-when-called-from-the-termin has an example of not setting Python path, but setting as an Alias, ie.
alias pyconda='~/anaconda3/bin/python3'
I'm just not sure how to substitute it where
export PATH=...
while also including the stuff atconda activate base
So what I'd like to have though is something where I can do
$ pyconda
and it activatesconda
and then activatesbase
environment or another environment (such asdsi
).Other resources: