<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I'm trying to use GDAL and Python3 from OSGeo4W in my application and I have the following questions:</div><div><br></div><div>1. As I'm targeting only Python3 (using python3-gdal-2.2.4-1.tar.bz2), I was wandering if I need to provide also the Python27 for the gdal-python scripts (gdal-python-2.2.4-2.tar.bz2) ? </div><div>Are they all the gdal-python scripts Python3 compatible? If so, why does 

gdal-python-2.2.4-2.tar.bz2 include the Python27 libs/site-packages and not in a separate file as for Python3?</div><div><br></div><div>2. I'm trying to figure out a way to start my app without setting an additional mandatory env-variable (PYTHONHOME) globally or with a batch file, so far I could only start it with the following batch file:</div><div><div><br></div><div>set OSGEO4W_ROOT=%~dp0\OSGeo4W-org</div><div>set PYTHONHOME=%OSGEO4W_ROOT%\apps\python36</div></div><div>myapp.exe</div><div><br></div><div>Otherwise my app crushes upon Python DLL initialization.</div><div><br></div><div>I tried to set PYTHONHOME with the SetEnvironmentVariable function but although I get the correct value with GetEnvironmentVariable, (the same as with the env-varialbe method), my app still crushes upon the DLL initialization.</div><div>I understand it must be possible because somehow starting qgis-bin.exe works (I guess it has to do with the qgis-bin.env file, but how does it work?</div><div><br></div><div>I had no problem using the official Python3.6 distribution (I guess because PYTHONHOME is the same as the python3.dll  folder)</div><div><br></div><div>3. I could not find GDAL/Python27/Python36 meta packages (as there is for QGIS) to install GDAL or Python and their dependencies. </div><div>After a research I could pull out the following dependency list for GDAL and the package list for Python3, how can I make meta packages out of them so it would be easier to download/install?</div><div><br></div><div><div><b>gdal-2.2.4-2.tar.bz2 dependency list:</b></div><div><div>gdal-ecw-2.2.4-2.tar.bz2</div><div>gdal-mrsid-2.2.4-2.tar.bz2</div><div>gdal-oracle-2.2.4-2.tar.bz2</div><div>gdal-python-2.2.4-2.tar.bz2</div><div>gdal-sosi-2.2.4-2.tar.bz2</div></div><div><div>curl-7.60.0-1.tar.bz2</div><div>expat-2.1.0-1.tar.bz2</div><div>freexl-1.0.2-1.tar.bz2</div><div>geos-3.6.1-1.tar.bz2</div><div>hdf5-1.8.11-2.tar.bz2</div><div>iconv-1.14-1.tar.bz2</div><div>iconv-vc14-1.15-1.tar.bz2</div><div>libjpeg-6b-4.tar.bz2</div><div>liblwgeom-2.3.0-1.tar.bz2</div><div>libmysql-6.1.9-1.tar.bz2</div><div>libpng-1.6.3-1.tar.bz2</div><div>libpq-9.2.4-1.tar.bz2</div><div>libxml2-2.9.1-1.tar.bz2</div><div>msvcrt-1.0.3-1.tar.bz2</div><div>netcdf-4.4.1.1-1.tar.bz2</div><div>ogdi-3.2.1-1.tar.bz2</div><div>openjpeg-2.3.0-1.tar.bz2</div><div>openssl-1.0.2j-1.tar.bz2</div><div>proj-4.9.3-1.tar.bz2</div><div>spatialite-4.3.0-4.tar.bz2</div><div>sqlite3-3.17.0-4.tar.bz2</div><div>szip-2.1-1.tar.bz2</div><div>xerces-c-3.2.0-1.tar.bz2</div><div>xz-5.2.3-1.tar.bz2</div><div>zlib-1.2.8-1.tar.bz2</div></div></div><div><br></div><div><b>Python3 packages:</b></div><div><div>pyqt5-5.9-3.tar.bz2</div><div>python3-certifi-2018.1.18-1.tar.bz2</div><div>python3-chardet-3.0.4-1.tar.bz2</div><div>python3-core-3.6.0-2.tar.bz2</div><div>python3-cycler-0.10.0-1.tar.bz2</div><div>python3-decorator-4.2.1-1.tar.bz2</div><div>python3-exifread-2.1.2-1.tar.bz2</div><div>python3-future-0.16.0-1.tar.bz2</div><div>python3-httplib2-0.10.2-1.tar.bz2</div><div>python3-idna-2.6-1.tar.bz2</div><div>python3-ipython-genutils-0.2.0-1.tar.bz2</div><div>python3-jinja2-2.9.4-1.tar.bz2</div><div>python3-jsonschema-2.6.0-1.tar.bz2</div><div>python3-jupyter-core-4.4.0-1.tar.bz2</div><div>python3-markupsafe-0.23-1.tar.bz2</div><div>python3-matplotlib-2.0.0-1.tar.bz2</div><div>python3-mock-2.0.0-1.tar.bz2</div><div>python3-nbformat-4.4.0-1.tar.bz2</div><div>python3-networkx-2.0-1.tar.bz2</div><div>python3-nose2-0.6.5-1.tar.bz2</div><div>python3-numpy-1.12.0+mkl-1.tar.bz2</div><div>python3-owslib-0.14.0-1.tar.bz2</div><div>python3-pbr-1.10.0-1.tar.bz2</div><div>python3-plotly-2.5.1-1.tar.bz2</div><div>python3-psycopg2-2.7.3.2-1.tar.bz2</div><div>python3-pygments-2.2.0-1.tar.bz2</div><div>python3-pyodbc-4.0.9-1.tar.bz2</div><div>python3-pyparsing-2.1.10-1.tar.bz2</div><div>python3-pypiwin32-220-1.tar.bz2</div><div>python3-pyproj-1.9.5.1-1.tar.bz2</div><div>python3-python-dateutil-2.6.0-1.tar.bz2</div><div>python3-pytz-2018.3-1.tar.bz2</div><div>python3-pyyaml-3.12-1.tar.bz2</div><div>python3-qscintilla-2.10.1-1.tar.bz2</div><div>python3-requests-2.18.4-1.tar.bz2</div><div>python3-scipy-0.19.0rc2-1.tar.bz2</div><div>python3-shapely-1.5.17-1.tar.bz2</div><div>python3-simplejson-3.10.0-1.tar.bz2</div><div>python3-six-1.11.0-1.tar.bz2</div><div>python3-traitlets-4.3.2-1.tar.bz2</div><div>python3-urllib3-1.22-1.tar.bz2</div><div>python3-xlrd-1.0.0-1.tar.bz2</div><div>python3-xlwt-1.2.0-1.tar.bz2</div><div>sip-qt5-4.19.3-1.tar.bz2</div></div><div><br></div><div>Thanks,</div><div>Idan</div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>