I have a python script which looks like this:
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import ...
And can normally execute it with python3 script.py but can't do so doing this: ./script.py.
The script is executable (755), has the correct character encoding and is in unix style (LF instead of CRLF).
When I run /usr/bin/env python3 I get dropped into the python shell interpreter.
When executing the python script from bash the interpreter (for the script) is bash, when executing it from zsh the interpreter is sh.
It doesn't matter if I change the shebang to any of the following variants:
#!/usr/bin/python3
#!/usr/bin/env python
etc...
Has anyone any ideas?