[gdal-dev] Selecting Python during configuration

Charlie Sharpsteen chuck at sharpsteen.net
Thu Nov 1 18:55:55 PDT 2012


On Thu, Nov 1, 2012 at 6:01 PM, Michael Speth <SpethM at landcareresearch.co.nz
> wrote:

>  Greetings,
>
>   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.
>
>
>
> 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.
>
>
>
> Is there a way to set gdal to point to a different install directory for
> python?
>

One strategy is to configure and build `--without-python`, then after
running `make` and `make install`, do the following:

    cd swig/python
    /path/to/desired/python setup.py install_lib
[--install-dir=/optional/site-packages/dir/if/you/dont/like/the/default]
    cp scripts/* /some/bin/folder/on/your/PATH

-Charlie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121101/1721e016/attachment.html>


More information about the gdal-dev mailing list