[C++-sig] Wrong python found
David Abrahams
dave at boost-consulting.com
Sat Feb 15 17:31:50 CET 2003
John J Lee <jjl at pobox.com> writes:
> Would be nice if boost python could find the right python executable on
> systems like mine -- I have 2.2 installed, but python is a link to 2.1, so
> unless I hack python.jam to set PYTHON = /usr/bin/python2.2 I get link
> errors on running the tests.
You don't need to (and should not) hack python.jam.
If you have an executable called "python" which is python2.2, it is
probably installed in /usr/python2.2/bin or usr/local/python2.2/bin.
In that case all you need to do is to set PYTHON_ROOT as described
here:
http://www.boost.org/libs/python/doc/building.html
You can set it in your environment, or you can set it on your bjam
command-line, e.g.:
bjam -sPYTHON_ROOT=/usr/local/Python2.2 ...
Failing that, you can still set PYTHON on your command-line or in your
environment, e.g.
bjam -sPYTHON=/usr/bin/python2.2
> A PYTHON_BIN would do the trick, but I think if PYTHON_VERSION is set,
> /usr/bin/python2.2 should be preferred over /usr/bin/python.
I guess so, but where should the smarts stop? Eventually some
reasonable Python installations will be outside the system's ability
to automatically infer what to do.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list