0

I am facing some difficulties running my python script without the "Python" keyword at the beginning. I've tried several suggestions already from similar questions, but none of them worked :

  • using #!/usr/bin/env python at the top of the script didn't help me as suggested in other places. I'm getting the following error:

    : No such file or directory

  • changed file and folder permissions :

    ls -la script.py

    -rwxrwxrwx 1 myuser g 24528 Apr 7 01:25 script.py

  • tried to use #!/usr/bin/python2.7 -B but got the following error when trying to execute :

    Unknown option: -

    usage: /usr/intel/bin/python2.7 [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information.

I can't figure it out why I'm not able to run the script just as it is ./script.py, and not calling python interpreter manually at the beginning.

user3819295
  • 861
  • 6
  • 19

0 Answers0