I am trying to set up QGIS3 and python so I can write a script that uses GDAL- I want to do this from the OSGEO4W shell. I have read a lot of questions and followed some tutorials which led me to do this once installing the software:
Firstly I load this cmd which works without error in the OSGEO4W shell:
@echo off SET OSGEO4W_ROOT=C:\OSGeo4W64 call "%OSGEO4W_ROOT%"\bin\o4w_env.bat @echo off path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin path %PATH%;%OSGEO4W_ROOT%\apps\Qt5\bin path %PATH%;%OSGEO4W_ROOT%\apps\Python36\Scripts set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python set PYTHONHOME=%OSGEO4W_ROOT%\apps\Python36 set PATH=C:\Users\Issy\Documents\QGIS;%PATH%
Then there is the issue:
python3 Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32 import qgis.core Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\OSGeo4W64\apps\qgis\python\qgis\core\__init__.py", line 27, in ><module> from qgis._core import * ImportError: DLL load failed: The specified procedure could not be found.
I have tried numerous
pythonpath settings and installed/re-installed with different settings but I just can't get this to work.