当我在 CentOS 7 中输入 Python 时,强制显示本机 Python3

当我在 CentOS 7 中输入 Python 时,强制显示本机 Python3

我已经安装了两者native Python 3,但是Anaconda Python 3目前,我想Python 3在输入时使用本机$ python。你知道为什么它默认为 Anaconda Python 3 以及如何修复它吗?

$ echo $PATH
/usr/local/cuda-10.0/bin:/miniconda/bin:/scratch3/MATLAB/matlab/bin:/home/grad3/jalal/.local/bin:/opt/rh/rh-php70/root/bin:/scratch2/system/opt/pycharm-community-2018.1.2/bin:/scratch2/google-cloud-sdk/bin:/scratch2/google-cloud-sdk/bin:/usr/local/cuda-10.0/bin:/miniconda/bin:/scratch3/MATLAB/matlab/bin:/home/grad3/jalal/.local/bin:/opt/rh/rh-php70/root/bin:/scratch2/system/opt/pycharm-community-2018.1.2/bin:/scratch2/google-cloud-sdk/bin:/scratch2/google-cloud-sdk/bin:/usr/local/cuda-10.0/bin:/miniconda/bin:/scratch3/MATLAB/matlab/bin:/home/grad3/jalal/.local/bin:/opt/rh/rh-php70/root/bin:/scratch2/system/opt/pycharm-community-2018.1.2/bin:/scratch2/google-cloud-sdk/bin:/scratch2/google-cloud-sdk/bin:/usr/local/cuda-10.0/bin:/miniconda/bin:/scratch3/MATLAB/matlab/bin:/home/grad3/jalal/.local/bin:/opt/rh/rh-php70/root/bin:/scratch2/system/opt/pycharm-community-2018.1.2/bin:/scratch2/google-cloud-sdk/bin:/scratch2/google-cloud-sdk/bin:/usr/local/cuda-10.0/bin:/miniconda/bin:/scratch3/MATLAB/matlab/bin:/home/grad3/jalal/.local/bin:/opt/rh/rh-php70/root/bin:/scratch2/system/opt/pycharm-community-2018.1.2/bin:/scratch2/google-cloud-sdk/bin:/scratch2/google-cloud-sdk/bin:/scratch/sjn-p3/anaconda/anaconda3/bin:/home/grad3/jalal/.cargo/bin:/usr/local/cuda-10.0/bin:/miniconda/bin:/scratch3/MATLAB/matlab/bin:/home/grad3/jalal/.local/bin:/opt/rh/rh-php70/root/bin:/scratch2/system/opt/pycharm-community-2018.1.2/bin:/scratch2/google-cloud-sdk/bin:/scratch2/google-cloud-sdk/bin:/scratch/sjn-p3/anaconda/anaconda3/bin:/usr/lib64/qt-3.3/bin:/scratch/sjn-p3/anaconda/anaconda3/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/IT/bin:/home/grad3/jalal/bin:/scratch/sjn-p2/anaconda/anaconda2/bin:/usr/bin/python3

$ which -a python
alias python='python3'
    /scratch/sjn-p3/anaconda/anaconda3/bin/python3
    /scratch/sjn-p3/anaconda/anaconda3/bin/python3
    /usr/bin/python3
/scratch/sjn-p3/anaconda/anaconda3/bin/python
/scratch/sjn-p3/anaconda/anaconda3/bin/python
/usr/bin/python
/scratch/sjn-p2/anaconda/anaconda2/bin/python

我的 中有以下内容~/.bashrc

export PATH=$PATH:/usr/bin/python3
alias python=python3

我想进入$ python并能够使用/usr/bin/python3

相关内容