I use python 64bit as 开发者_如何学Gofollows.
alias python64='arch -x86_64 /usr/bin/python2.6'
How can I run python 64bit mode with shebang(#!)?
??? #!/usr/bin/python2.6 ???
In OS X 10.6 arch
is /usr/bin/arch
, so your line is
#!/usr/bin/arch -x86_64 /usr/bin/python2.6
In general, if you don't know the path you can always use the env
command in the shebang as shown here, which is guaranteed to be in /usr/bin
. So,
#!/usr/bin/env arch -x86_64 /usr/bin/python2.6
will also work.
#!/path/to/arch -x86_64 /usr/bin/python2.6
I dont have a mac to test right now, but usually in *nix you can find the path to an executable using:
which arch
精彩评论