I understand this is not exactly a Python question, but it may be of 
interest to other Python programmers, so I'm asking it here instead of a 
more generic Linux group.

I have a Centos system which uses Python 2.4 as the system Python, so I 
set an alias for my personal use:

[steve@ando ~]$ which python
alias python='python2.7'
        /usr/local/bin/python2.7


When I call "python some_script.py" from the command line, it runs under 
Python 2.7 as I expected. So I give the script a hash-bang line:

#!/usr/bin/env python

and run the script directly, but instead of getting Python 2.7, it runs 
under Python 2.4 and gives me system errors.

When I run env directly, it ignores my alias:

steve@ando ~]$ /usr/bin/env python -V
Python 2.4.3


What am I doing wrong?


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to