I just downloaded a python script and noticed that the "shebang" line at the top looks like:

#!/usr/bin/env python

instead of the familiar


What's the reason for that?


This is commonly used if the absolute path of the interpreter binary is not know or is assumed to be in different location from system to system. For python one could have an installation in /usr/local/ in addition to the ones installed by the distribution in /usr/. Without env in the shebang you would have to modify it to reflect your installation in /url/local/.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.