How do I find where Python is located on Unix?

Adam picture Adam · Dec 7, 2010 · Viewed 39.6k times · Source

I'm working on a new server for a new workplace, and I'm trying to reuse a CGI script I wrote in Python earlier this year. My CGI script starts off with

#!/local/usr/bin/python

But when I run this on the new server, it complains that there's no such folder. Obviously Python's kept in a different place on this box, but I've got no idea where.

I haven't done much unix before, just enough to get around, so if there's some neat trick I should know here I'd appreciate it :)

Thanks!

Answer

icyrock.com picture icyrock.com · Dec 7, 2010

Try:

which python

in a terminal.