shell - Why do people write #!/usr/bin/env python on the first line of a Python script? - Stack Over

shell - Why do people write #!/usr/bin/env python on the first line of a Python script? - Stack Over

瀏覽:322
日期:2025-11-17
Expanding a bit on the other answers, here's a little example of how your command line scripts can get into trouble by incautious use of /usr/bin/env shebang lines: $ /usr/local/bin/python -V Python 2.6.4 $ /usr/bin/python -V Python 2.5.1 $ cat my_script....看更多