Tagged Questions
0
votes
3answers
128 views
Is shebang always the same as the interpreter's installation directory?
Must the shebang header always match the interpreter's installation directory? If so, then why do both #!/usr/bin/python and #!/usr/local/bin/python work for me?
3
votes
2answers
2k views
Running python script from terminal without .py extension
I want to call a python script script.py from the terminal by simply typing script. Is this possible? If so, how?
I know I can avoid typing python script.py by adding #!/usr/bin/env python to the top ...
0
votes
0answers
177 views
python error using an executable with Z shell
I'm getting this error from the Unix Z shell (I'm on Mac):
python: posix_spawn: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: No such file or ...
10
votes
5answers
2k views
How can I use environment variables in my shebang?
I have a Python script that need to be run with a particular python installation.
Is there a way to craft a shebang so that it runs with $FOO/bar/MyCustomPython?