Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem with env?



I don't see how it can have anything to do with zsh per se. The kernel is
responsible for interpreting the #! line and running the /usr/bin/env
program which in turn just uses the PATH env var to find the named binary.
So what does the output of these commands look like for each environment:

echo $PATH
which python3


On Wed, Dec 25, 2013 at 1:56 AM, İsmail Dönmez <ismail@xxxxxxxxx> wrote:

> Hi,
>
> I have a very simple script:
>
> #!/usr/bin/env python3
> # -*- coding: utf-8 -*-
> #
>
> import sys
> print("%s.%s.%s" % (sys.version_info.major,
>                     sys.version_info.minor,
>                     sys.version_info.micro))
>
> This is supposed to run in  python3. With zsh 5.0.2
> (x86_64-suse-linux-gnu):
>
> [~]> ./test.py
> 2.7.5
>
> So it runs python instead of python3. With bash 4.2:
>
> [~]> ./test.py
> 3.3.2
>
> So obviously something going on with zsh or my zsh setup. Any ideas?
>



-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank


Messages sorted by: Reverse Date, Date, Thread, Author