Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
"#! /usr/bin/env python" does not work..... help
I've left this post on devshed as well but I can't get an answer and I'm real stuck.
I am trying to learn Python and I've done quite a bit in the last three weeks in the IDLE environment. However I am now trying to get my programs to execute from the command line in Fedora Linux using [italic]#! /usr/bin/env python[/italic] but I just can't get it to work.
I have [italic]env[/italic] and [italic]python[/italic] in the /usr/bin directory. I have changed the permissions using [italic]chmod +x[/italic] for my file and whenever I try to execute without the [italic]python[/italic] command Bash just reports command not found:
[b][root@localhost moonshinerat]# mycode.py
bash: mycode.py: command not found
[root@localhost moonshinerat]# mycode
bash: mycode: command not found
I'm at my wits end with this and I'm going to defect to Ruby if I can't get this simple thing to work. Thanks for any solutions guys,