[Tutor] Running Python on Gentoo

Greg Lindstrom greg.lindstrom at novasyshealth.com
Thu Jul 26 20:44:41 CEST 2007


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



More information about the Tutor mailing list