[Tutor] Running Python on Gentoo
Eric Brunson
brunson at brunson.com
Thu Jul 26 21:33:54 CEST 2007
What does the command "which python" say?
Khamid Nurdiev wrote:
> Yes, I have the same problem with running python scripts from console
> in Debian, the line "#! /usr/bin/python" doesn't help. I have to type
> "python script.py" in order to run the script.py file.
>
> On 7/26/07, *Greg Lindstrom* <greg.lindstrom at novasyshealth.com
> <mailto:greg.lindstrom at novasyshealth.com>> wrote:
>
> Hello,
> I am running python 2.4.2 on Gentoo Unix and am having problems
> running
> programs. I have a script, hello.py as such:
>
> #! /usr/bin/python
> print 'hello, world'
>
> that I save and add executable permission. Then at the prompt I
> type in..
>
> $ ./hello.py
> -bash: ./hello.py: /usr/bin/python: bad interpreter: Permission denied
>
> If I type
> $ python hello.py
> I get "hello, world" as expected.
>
> I was hoping that the "shabang" would have the script execute. Am I
> missing something? Can you help me? BTW, when I type /usr/bin/python
> at the prompt I get the python interpreter, so at least that's
> working.
>
> Thanks,
> --greg
>
> _______________________________________________
> Tutor maillist - Tutor at python.org <mailto:Tutor at python.org>
> http://mail.python.org/mailman/listinfo/tutor
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list