Help me find Python interpreter!!!

I just started learning python on and working on sun solaries,

#!/usr/bin/env python

Is not recognising the intrepreter on my sun solaries could any one please help me find this.

Thanks - Ann:b:

Try

which python

that will show you where python lives. Assume it is:
/usr/local/sbin/python

then you would code this shebang

#!/usr/local/sbin/python

python is optional it is not always installed in the same place on all machines.

find / -fstype ufs -type f -name python -ls

I wouldn't suggest "-fstype ufs" as it rules out zfs and vxfs.

I wouldn't suggest using zfs or vxfs :wink:

The open poster might use it anyway.

In any case, I always suggest to use ZFS :cool:

To get it working on my SPARC I first checked if it was installed using:

which python

It wasn't in my path so I put it in my path by editing '/home/bradj47/.cshrc'. It was way easier than downloading the interpreter and contacting my network administrator to give me the permissions to install it.

How is that done.Editing in /home

If you're referring to me:

vi ~.cshrc

or if you don't know how to use vi:

gedit ~.cshrc

or if you're using CDE:

dtpad ~.cshrc

If none of those work then open whatever text editor you use and open the file: /home/foobar/.cshrc - your user name in place of foobar, of course.

Now to add to your path. Look for something in .cshrc that looks something like this (this is what mine looks like):

set path=( /usr/j2se/jre1.6.0_01/bin /opt/SUNWspro/bin /bin /usr/ccs/bin /usr/bi
n /usr/ucb /etc /usr/sbin /usr/openwin/bin /usr/pkg/gcc-2.7.2/bin /export/home/d
ave/download/acroread/instdir/bin /opt/NSCPcom /home/dave/download/Mozilla/mozil
la /home/dave/download/firefox-1.5.0.2x86/MOZfirefox/reloc/sfw/lib/firefox /opt/
sfw/kde/bin /opt/sfw/bin/ /home/dave/download/bin /usr/dt/bin /usr/lib/lp/postsc
ript . )

MAKE SURE THERE IS NO POUND SIGN (#) IN FRONT OF THE WORD 'SET' Look for one WITHOUT the pound sign. Add the result you got when you ran the 'which' command to the end of the list of path. If there is none without a pound sign, try removing the pound sign, saving the file, then running the command. If that doesn't work, add the the result you got when you used the 'which' command to the end of the set of paths. Make sure there is a space between the new path you added and the previous path.

Good luck,
Brad