Jeff
Jeff

Reputation: 4003

running python executable in linux

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.

Upvotes: 3

Views: 1392

Answers (1)

Mark Reed
Mark Reed

Reputation: 95252

The path is /usr, not /user.

Upvotes: 12

Related Questions