On Thu, Nov 1, 2012 at 6:01 PM, Michael Speth <span dir="ltr"><<a href="mailto:SpethM@landcareresearch.co.nz" target="_blank">SpethM@landcareresearch.co.nz</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-NZ" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Greetings,</p>
<p class="MsoNormal"> I am attempting to compile gdal with python support. However, I don't want to use the system installed python; I want to use a locally compiled version of python. I am unable to find how to select the python version to use with the
gdal install.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">It seems that --with-python doesn't have an option to set the python install directory; --with-hdf5 can set the install directory of hdf5.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Is there a way to set gdal to point to a different install directory for python?</p></div></div></blockquote><div><br></div><div>One strategy is to configure and build `--without-python`, then after running `make` and `make install`, do the following:</div>
<div><br></div><div> cd swig/python</div><div> /path/to/desired/python setup.py install_lib [--install-dir=/optional/site-packages/dir/if/you/dont/like/the/default]</div><div> cp scripts/* /some/bin/folder/on/your/PATH</div>
<div><br></div><div>-Charlie</div><div><br></div></div></div>