[gdal-dev] Need suggestion on clipping vectors in batch

Margherita Di Leo diregola at gmail.com
Fri Oct 7 03:00:17 PDT 2016


Dear Even, all,

On Thu, Oct 6, 2016 at 3:25 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> Le jeudi 06 octobre 2016 14:47:05, Margherita Di Leo a écrit :
> > Dear Even,
> >
> >
>
> Try:
>
> export PYTHONPATH=$GDAL_INSTALL_DIR/lib/python2.7/site-packages
>
> ( adapt the path to the python version you use)
>

It didn't help.
Sorry to go off-topic from original subject but I really cannot understand
what's wrong with my work flow.
I write down every single step:

# Download source
cd $HOME/opt
svn checkout https://svn.osgeo.org/gdal/trunk/gdal gdal-source

# Create bin dir
mkdir -p $HOME/opt/gdal-bin
export GDAL_INSTALL_DIR=$HOME/opt/gdal-bin

# set environment variables for current session
export PATH=$GDAL_INSTALL_DIR/bin:$PATH
export LD_LIBRARY_PATH=$GDAL_INSTALL_DIR/lib:$LD_LIBRARY_PATH
export GDAL_DATA=$GDAL_INSTALL_DIR/share/gdal

# compile gdal in local folder
cd $HOME/opt/gdal-source
./configure --prefix=$GDAL_INSTALL_DIR
make
make install

# setting up python environment
cd $HOME/opt/gdal-source/swig/python
python setup.py build
mkdir -p $GDAL_INSTALL_DIR/lib64/python2.7/site-packages/
export
PYTHONPATH=$GDAL_INSTALL_DIR/lib64/python2.7/site-packages:$PYTHONPATH
python setup.py install --prefix=$GDAL_INSTALL_DIR

# Check if works
python
from osgeo import gdal


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "osgeo/__init__.py", line 21, in <module>
    _gdal = swig_import_helper()
  File "osgeo/__init__.py", line 13, in swig_import_helper
    import _gdal
ImportError: No module named _gdal


Outside python:

gdalinfo --version
GDAL 2.2.0dev, released 2016/99/99

:-/


-- 
Margherita Di Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161007/ca244c2a/attachment.html>


More information about the gdal-dev mailing list