[Pythonmac-SIG] bin and version

Henning Hraban Ramm hraban at fiee.net
Sun Apr 9 14:52:04 CEST 2006


> On Apr 8, 2006, at 7:59 PM, linda.s wrote:
>
>> Hi,
>> I installed quite a few python versions in my computer and I want to
>> know where they are located.
>> Should i check them in the bin folder?
>> If so, why I can not find the bin folder in my home directory?

Am 2006-04-09 um 02:25 schrieb Charles Hartman:

> Which doesn't answer your question about what (Unix) commands to
> issue (in the Terminal) to find your Pythons. I'll leave that to
> somebody who understands Unix-land better than I do . . .

Try 'whereis python'.
(I don't really know if it can list several different installations,  
I get only one.)

Generally a great help is the 'locate' utility, but it first needs a  
database created:

sudo /usr/libexec/locate.updatedb
(sudo needs your password and locate.updatedb a long while...)

and then

locate python | grep bin/python
(that lists 22 versions on my machine; some are only symlinks, others  
are part of applications or on my second partition with an old  
installation...)

'locate' is '/usr/bin/locate'; you should add '/usr/bin' to your PATH  
if it's not part of it already.

BTW, instead of pure 'ls' you could use 'ls -FGAlh' to get more  
detailed information; I mapped that onto 'll' with:

alias ll='ls -FGAlh'

If you want to know which of your Pythons is used if you type  
'python', try:

which python

Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
http://www.cacert.org (I'm an assurer)




More information about the Pythonmac-SIG mailing list