3

I've found a few other people asking this question, but the answers for their problem are not helping me. I trying to learn python and trying to make a file executable.

The practice script runs when I type python ./userPrompt.py. But when I try to run it as an executable (just ./userPrompt.py).

I've successful change it chmod +x And here's what i have in the top line of the file:

    #! /user/bin/env python 

and here's the error I get

   bash: ./userPrompt.py: /user/bin/env: bad interpreter: No such file or directory

But the thing is if I go to /user/bin I can find env. So it definitely exists. Why can't Ubuntu find it??

I appreciate any help people can give me on this.

1 Answer 1

12

The path is /usr, not /user.

Sign up to request clarification or add additional context in comments.

4 Comments

/usr may confuse, but umount is worse!
wow ... i feel like an idiot -- i feel like I should lose rep points for foolishness. Everything works now, thanks.
@Jeff don't feel too bad, we've all been there (the difference being some of us won't admit it :-)
Jeff - hey, accept my answer, and I'll never tell a soul. @Levon - speak for yourself. I was born knowing my way around Unix, despite the fact that it hadn't been invented yet. ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.