简体   繁体   中英

About python “#!usr/bin/env python”?

I put " #!usr/bin/env python " at the first line in coroutine.py, but when I try to run coroutine.py directly by " ./test.py ", I get this:

zsh: ./coroutine.py: bad interpreter: usr/bin/env: no such file or directory

Is that something wrong in my zshrc?

because you missed the leading slash: #!/usr/bin/env python and it's called hashbang (and not a shebang wich is only the #! part as @cdarke explained in comments)

More about shebang/hashbang

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM