[opensource-dev] specifying wich python binary to use?

Cinder Roxley cinder at alchemyviewer.org
Sun Sep 23 04:22:03 PDT 2018


I usually setup a virtualenv for each viewer since several tpvs use
different forks of linden’s autobuild.

virtualenv ./autobuild
source autobuild/bin/activate
pip install llbase
pip install 'https://bitbucket.org/lindenlab/autobuild-1.0'


On September 23, 2018 at 3:57:07 AM, Lance Corrimal (
lance.corrimal at eregion.de) wrote:

Am Samstag, 22. September 2018, 16:53:27 CEST schrieb Lance Corrimal:
> Am Samstag, 22. September 2018, 16:00:31 CEST schrieb Henri Beauchamp:
> > On Sat, 22 Sep 2018 15:43:14 +0200, Lance Corrimal wrote:
> > > I have python 2 and python 3 installed on my system, is there a way
to
> > > specify which python version autobuild should use? by default it
tries
> > > python3, which fails.
> >
> > Depending on your distribution, you may specify (or not) which Python
> > version is to be used when invoking 'python', with: alternatives
--config
> > python
>
> looked into that already, didn't work.
> The weird thing is, /usr/bin/python already points at /usr/bin/python2,
but
> autobuild still picks up python 3...
>
> > If it does not work, you may trick the build system by creating a
"python"
> > link to the python2 binary and then changing the PATH so that your link
is
>
> > found first. E.g. from a terminal:
> gonna try that. Why didn't I think of that myself (no I do not want the
> obvious answer :P)

the trick with the link did not work either, cmake is evil enough to
actually
search for python binaries WITH the attached version number.

BUT there is a variable that you can pass to autobuild, to pass it on to
cmake, that contains a list of the version numbers to search for...

-DPython_ADDITIONAL_VERSIONS:STRING="2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0"

with this autobuild does not find python3 binaries, and all is well.

Cheers
LC






_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting
privileges
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20180923/cd4bb7dd/attachment.htm 


More information about the opensource-dev mailing list