路径没有真正给Python的路径

时间:2016-06-10 16:32:29

标签: bash

which命令似乎没有给出正确的结果:

[ray@localhost ~]$ unalias python
bash: unalias: python: not found
[ray@localhost ~]$ unalias which
bash: unalias: which: not found
[ray@localhost ~]$ which python
/usr/local/bin/python
[ray@localhost ~]$ /usr/local/bin/python -V
Python 2.7.6
[ray@localhost ~]$ python -V
Python 2.6.6
[ray@localhost ~]$ ls -l /usr/local/bin/python*
lrwxrwxrwx. 1 root root   11 Jun 10 12:27 /usr/local/bin/python -> python2.7.6
-rwxr-xr-x. 1 root root 8040 Jun 10 12:21 /usr/local/bin/python2.7
-rwxr-xr-x. 1 root root 8040 Jun 10 12:25 /usr/local/bin/python2.7.6
-rwxr-xr-x. 1 root root 1674 Jun 10 12:23 /usr/local/bin/python2.7-config
lrwxrwxrwx. 1 root root   16 Jun 10 12:23 /usr/local/bin/python2-config -> python2.7-config
lrwxrwxrwx. 1 root root   14 Jun 10 12:23 /usr/local/bin/python-config -> python2-config
[ray@localhost ~]$ 

1 个答案:

答案 0 :(得分:3)

不,which没问题。 bash很困惑。

hash -d python