<div dir="ltr"><div>Hi all,</div><div>The great news is that I have already solved the problem.</div><div>I'm just writing to ask if anybody understands the reason behind this phenomenon and to give advice for those how must struggle with the same problem.</div><div><br></div><div>I have an eclipse startup bat as instructed in qgis documentation and still, I got the DLL load failed error when trying to import something from qgis.core.</div><div><br></div><div>The reason for this is the way I defined a jvm for Eclipse in eclipse.ini (I don't have JRE bundled in eclipse installation).</div><div>At the first, I had in my eclipse.ini</div><div>-vm</div><div>C:\ProgramData\Oracle\Java\javapath</div><div>and I got the ImportError</div><div>when I changed that to the real JRE path</div><div>-vm</div><div>C:\Program Files\Java\jre1.8.0_152\bin\javaw.exe</div><div>everything work as supposed to.</div><div><br></div><div>The javapath folder is a "new" way to define used java version. It has symlinks (yes, on windows) to the real java installation. This is the folder that java installation appends to the PATH environment variable.</div><div><br></div><div>In both ways, the sys.path is the same.</div><div>When eclipse is started with -vm C:\ProgramData\Oracle\Java\javapath</div><div>os.environ['PATH'] is:</div><div>C:/Program Files/Java/jre1.8.0_152/bin/server;C:/Program Files/Java/jre1.8.0_152/bin;C:/Program Files/Java/jre1.8.0_152/lib/amd64;C:\OSGEO4~1\apps\qgis-dev\bin;C:\OSGEO4~1\apps\qt5\bin;C:\OSGEO4~1\apps\Python36;C:\OSGEO4~1\apps\Python36\Scripts;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem;C:\OSGeo4W64;</div><div>and when with -vm C:\Program Files\Java\jre1.8.0_152\bin\javaw.exe</div><div>the os.environ['PATH'] is:</div><div>C:\OSGEO4~1\apps\qgis-dev\bin;C:\OSGEO4~1\apps\qt5\bin;C:\OSGEO4~1\apps\Python36;C:\OSGEO4~1\apps\Python36\Scripts;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem</div><div><br></div><div>I don't understand this because of the qgis_core.dll folder C:\OSGEO4~1\apps\qgis-dev\bin is in the PATH with both ways but it on the other way it gives an error.</div><div><br></div><div>I'm just happy now that I found the solution for this even I don't understand the reason.</div><div><br></div><div><br></div><div>Should we add this to the documentation also?</div><div><br></div><div>P.S.</div><div>Is there a reason for C:\OSGEO4~1\apps\Python27\Scripts to be still on the PATH when using py3 environment?</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>-Lauri</div></div>