Subject: Re: Running Python Scripts
To: Gary Parker <G.J.Parker@lboro.ac.uk>
From: Steven Sartorius <ssartor@bellatlantic.net>
List: netbsd-users
Date: 01/12/2005 21:31:58
The other way to do this (which I found by trial and error) is to set 
PYTHON_VERSION_DEFAULT=24 in your mk.conf.
Then go into pkgsrc/lang/python and make install.  This will create a 
symlink between python24 and python.  The advantage of doing this is 
that any of the various py add-ons in pkgsrc (e.g. py-readline) will 
build against the correct version of Python.

Steve

On Jan 11, 2005, at 11:47, Gary Parker wrote:

> Cheers Erik,
> 	I misunderstood what the script was trying to do. One symlink to
> python and everything's working fine now.
>
> Thanks,
> Gary
>
>> -----Original Message-----
>> From: Erik Osheim [mailto:erik@plastic-idolatry.com]
>> Sent: 11 January 2005 16:39
>> To: Gary Parker
>> Subject: Re: Running Python Scripts
>>
>> Gary,
>>
>> According to the env info page (info coreutils env) env is designed to
>> run programs in a "modified environment". That is, given env <name>,
>> the correct thing for env to do is look for <name> in your PATH,
>> etc. and then execute it.
>>
>> The proper way to solve this, IMHO, is to symlink python24 to python
>> (if you are the administrator on your system). With things like perl,
>> python, java, etc. it is usually best practice (IMO) to link one
>> instance to the default name (as well as it's own name, like
>> perl58 or whatever). The reason that "/usr/bin/env python" scripts
>> expect to work is that they expect the executable "python" to live
>> somewhere, even if only as a symlink.
>>
>> If you aren't an administrator, then I guess you are up a creek. Maybe
>> ask the administrator to create the link?
>>
>> Good luck,
>>
>> -- Erik
>