Skip to content

Commit faac5f6

Browse files
committed
Use system Python even when Anaconda is installed
1 parent 9ce190d commit faac5f6

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

zsh/custom/python.zsh

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,26 @@
44
# "conda init zsh" in a shell that has conda enabled (such as bash)
55
# >>> conda initialize >>>
66
# !! Contents within this block are managed by 'conda init' !!
7-
__conda_setup="$("${HOME}/miniconda3/bin/conda" 'shell.zsh' 'hook' 2> /dev/null)"
8-
if [ $? -eq 0 ]; then
9-
eval "$__conda_setup"
10-
else
11-
if [ -f "${HOME}/miniconda3/etc/profile.d/conda.sh" ]; then
12-
. "${HOME}/miniconda3/etc/profile.d/conda.sh"
13-
else
14-
export PATH="${HOME}/miniconda3/bin:$PATH"
15-
fi
16-
fi
17-
unset __conda_setup
7+
# __conda_setup="$("${HOME}/miniconda3/bin/conda" 'shell.zsh' 'hook' 2> /dev/null)"
8+
# if [ $? -eq 0 ]; then
9+
# eval "$__conda_setup"
10+
# else
11+
# if [ -f "${HOME}/miniconda3/etc/profile.d/conda.sh" ]; then
12+
# . "${HOME}/miniconda3/etc/profile.d/conda.sh"
13+
# else
14+
# export PATH="${HOME}/miniconda3/bin:$PATH"
15+
# fi
16+
# fi
17+
# unset __conda_setup
1818
# <<< conda initialize <<<
1919

20+
# Enable conda without setting it as the default Python
21+
CONDA_PATH="${HOME}/miniconda3/bin"
22+
if [ -d "${CONDA_PATH}" ]; then
23+
export PATH="${PATH}:${CONDA_PATH}"
24+
fi
25+
unset CONDA_PATH
26+
2027
# Fix Pythia 8 Python bindings
2128
if [ -d "/usr/local/share/Pythia8/" ]; then
2229
export PYTHONPATH="${PYTHONPATH}:/usr/local/lib"

0 commit comments

Comments
 (0)