0

I want to have a main launcher that executes a python program

The directory is /Downloads/Test/

#!/bin/bash/
python Test.py

I want to be able to run the file in the terminal, without the following error:

Failed to execute child process "/home/user/Downloads/Test/run" (Not a directory)

The default directory is in /home and I can only run sh there.

4
  • I am not sure I understand: what directory is /Downloads/Test/, and why are you using a script to run another script? Commented Oct 6, 2014 at 20:43
  • Is the / at the end of the shebang a typo in the post?
    – muru
    Commented Oct 6, 2014 at 20:46
  • the / could be the problem, and also what do you mean with "only sh"? can you not run bash?
    – rubo77
    Commented Oct 6, 2014 at 21:10
  • That is a sloppy way of running python scripts. See stackoverflow.com/questions/15587877/…
    – Panther
    Commented Oct 7, 2014 at 4:24

1 Answer 1

0

Please go to the directory where you have placed the python file and check the following parameters, If you have not already tried with this.

Make sure the first line of your file has #!/usr/bin/env python.

Make it executable -

chmod +x <filename>.py

And run it as

./<filename>.py

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .