Should I put #! (shebang) in Python scripts, and what form should it take?
Asked 07 September, 2021
Viewed 2.8K times
  • 54
Votes

Should I put the shebang in my Python scripts? In what form?

#!/usr/bin/env python 

or

#!/usr/local/bin/python

Are these equally portable? Which form is used most?

Note: the tornado project uses the shebang. On the other hand the Django project doesn't.

12 Answer