Search code examples
pythonpython-3.xshebang

Python shebang line


i've seen some people write their shebang line with a space after env. Eg.

#!/usr/bin/env python

Is this a typo?

I don't ever use a space. I use

#!/usr/bin/env/python

Can someone please clarify this?


Solution

  • No it isn't a typo! The one you are using will not work on all os's. E.G. in my Ubuntu Linux implementation 'env' is a program in /usr/bin not a directory so #!/usr/bin/env/python won't work.