Mismatch between sys.executable and sys.version in Python
问题 There are two Python interpreters installed: [user@localhost ~]$ /usr/bin/python -V && /usr/local/bin/python -V Python 2.4.3 Python 2.7.6 Sudo changes PATH for every command it runs as follows: [user@localhost ~]$ env | grep PATH && sudo env | grep PATH PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/user/bin PATH=/usr/bin:/bin I run a test script: [user@localhost ~]$ cat what_python.py #!/usr/bin/env python import sys print sys.executable print sys.version [user