<div dir="ltr">Yes, it was that. I replaced the library it was linked to with the one from my GDAL I built.<div><br></div><div>Thank you very much!</div><div><br></div><div>Regards.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 25, 2019 at 5:56 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On lundi 25 mars 2019 17:26:17 CET Alejandro Saucedo wrote:<br>
> Hello,<br>
> Please, your help with the following problem.<br>
> I am not able to see the Oracle OCI driver from python using the GDAL/OGR<br>
> bindings.<br>
> The following code prints always None:<br>
>     from osgeo import ogr<br>
>     print(ogr.GetDriverByName( 'OCI' ))<br>
>  Also, the driver is never listed here:<br>
>     drivers = [ogr.GetDriver(i).GetDescription() for i in<br>
> range(ogr.GetDriverCount())]<br>
>     drivers.sort()<br>
>     print(drivers)<br>
> ['ARCGEN', 'AVCBin', 'AVCE00', 'AeronavFAA', 'AmigoCloud', 'BNA', 'CAD',<br>
> 'CSV', 'CSW', 'Carto', 'Cloudant', 'CouchDB', 'DGN', 'DXF', 'EDIGEO', 'ESRI<br>
> Shapefile', 'ESRIJSON', 'ElasticSearch', 'GFT', 'GML', 'GMLAS', 'GPKG',<br>
> 'GPSBabel', 'GPSTrackMaker', 'GPX', 'GeoJSON', 'GeoRSS', 'Geoconcept',<br>
> 'HTF', 'HTTP', 'Idrisi', 'Interlis 1', 'Interlis 2', 'JML', 'JP2OpenJPEG',<br>
> 'KML', 'LIBKML', 'MBTiles', 'MVT', 'MapInfo File', 'Memory', 'NAS', 'ODS',<br>
> 'OGR_DODS', 'OGR_GMT', 'OGR_PDS', 'OGR_SDTS', 'OGR_VRT', 'OSM', 'OpenAir',<br>
> 'OpenFileGDB', 'PCIDSK', 'PDF', 'PGDUMP', 'PLSCENES', 'PostgreSQL', 'REC',<br>
> 'S57', 'SEGUKOOA', 'SEGY', 'SQLite', 'SUA', 'SVG', 'SXF', 'Selafin',<br>
> 'TIGER', 'TopoJSON', 'UK .NTF', 'VDV', 'VFK', 'WAsP', 'WFS', 'WFS3', 'XLS',<br>
> 'XLSX', 'XPlane', 'netCDF']<br>
> <br>
> However, OCI can be used in command line with ogr2ogr and it is listed when<br>
> executing ogrinfo --formats:<br>
>   OCI -vector- (rw+): Oracle Spatial<br>
> <br>
> My environment is as follows:<br>
> RHOL 7, GDAL 2.3.3, Python 3.6 (with Numpy 1.16.1), Oracle Instant Client<br>
> 18.5<br>
> <br>
> I have tried building the python bindings using the following alternatives:<br>
> 1) Building the python bindings with the GDAL source tree:<br>
> ./configure --prefix=<GDAL_PREFIX> --with-curl=/usr/bin/curl-config<br>
> --with-python=<PYTHON3.6_BIN>/python<br>
> --with-oci-include=$ORACLE_HOME/sdk/include --with-oci=$ORACLE_HOME<br>
> 2) Downloading the python bindings from<br>
> <a href="https://pypi.org/project/GDAL/2.3.3/#files" rel="noreferrer" target="_blank">https://pypi.org/project/GDAL/2.3.3/#files</a> and running setup.py<br>
> build/install process<br>
> 3) Using pip install GDAL==2.3.3<br>
> <br>
> The result is the same always, I can use the GDAL/OGR python API but cannot<br>
> see or use the OCI driver (the same for GeoRaster).<br>
> <br>
> As suggested at<br>
> <a href="https://trac.osgeo.org/gdal/wiki/BuildingOnUnix#OCIwithoutinstallingOracle" rel="noreferrer" target="_blank">https://trac.osgeo.org/gdal/wiki/BuildingOnUnix#OCIwithoutinstallingOracle</a>,<br>
> I have my ORACLE_HOME variable pointing to the instantclient folder,<br>
> ORACLE_HOME is also present at the PATH and LD_LIBRARY_PATH env vars as it<br>
> is GDAL/bin and GDAL/lib respectively.<br>
<br>
I presume the shared libraries of the python bindings link to another version <br>
of the GDAL lib than the one that you've built.<br>
Locate _<a href="http://gdal.cpython-36m-x86_64-linux-gnu.so" rel="noreferrer" target="_blank">gdal.cpython-36m-x86_64-linux-gnu.so</a> (or something like that), and run <br>
ldd on it to see to which libgdal it links to<br>
<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote></div>