Greetings. How to check the path to Python on Ubuntu to write it in shebang? It seems that I have it in usr / bin by default. And everywhere they write more env ... Or is it different for everyone?

    1 answer 1

    The command which python will show the path to Python.

    The env command in shebang is used just to not write the path. This makes the script portable.

    • Thank! So #! Usr / bin / env python3 - Sokolov.G