Quantcast
Channel: Should I put #! (shebang) in Python scripts, and what form should it take? - Stack Overflow
Viewing all articles
Browse latest Browse all 17

Answer by ik_zelf for Should I put #! (shebang) in Python scripts, and what form should it take?

$
0
0

If you use virtual environments like with pyenv it is better to write #!/usr/bin/env pythonThe pyenv setting will control which version of python and from which file location is started to run your script.

If your code is known to be version specific, it will help others to find why your script does not behave in their environment if you specify the expected version in the shebang.


Viewing all articles
Browse latest Browse all 17

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>