![当我在 CentOS 7 中输入 Python 时,强制显示本机 Python3](https://linux22.com/image/189943/%E5%BD%93%E6%88%91%E5%9C%A8%20CentOS%207%20%E4%B8%AD%E8%BE%93%E5%85%A5%20Python%20%E6%97%B6%EF%BC%8C%E5%BC%BA%E5%88%B6%E6%98%BE%E7%A4%BA%E6%9C%AC%E6%9C%BA%20Python3.png)
我已经安装了两者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