[英]How to change Python Version in Terminal? (MacOS)
當我鍵入type python3
時,它顯示python3 is /opt/anaconda3/bin/python3
我正在嘗試更改它以顯示python3 is /usr/local/bin/python3
這是當前我在終端中鍵入nano.bash_profile
時出現的內容:
PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}"
Export PATH
>>> 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
我還有兩個我不想使用的 anaconda python 解釋器。 請幫忙。
嘗試鍵入此內容以防止 conda 在打開終端時自動初始化基本環境
conda config --set auto_activate_base false
並將false
更改為true
以激活自動初始化 conda 環境
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.