在~/.bashrc中添加如下内容: alias python="/usr/bin/python2.7" alias python3="/root/anaconda3/bin/python3.7" source .bashrc