[QGIS-Developer] DLL load failed with PyDev

Lauri Kajan lauri.kajan at gmail.com
Fri Dec 15 04:03:09 PST 2017

Hi all,
The great news is that I have already solved the problem.
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

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

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).
At the first, I had in my eclipse.ini
and I got the ImportError
when I changed that to the real JRE path
C:\Program Files\Java\jre1.8.0_152\bin\javaw.exe
everything work as supposed to.

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.

In both ways, the sys.path is the same.
When eclipse is started with -vm C:\ProgramData\Oracle\Java\javapath
os.environ['PATH'] is:
C:/Program Files/Java/jre1.8.0_152/bin/server;C:/Program
and when with -vm C:\Program Files\Java\jre1.8.0_152\bin\javaw.exe
the os.environ['PATH'] is:

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.

I'm just happy now that I found the solution for this even I don't
understand the reason.

Should we add this to the documentation also?

Is there a reason for C:\OSGEO4~1\apps\Python27\Scripts to be still on the
PATH when using py3 environment?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171215/e7a188d9/attachment.html>

More information about the QGIS-Developer mailing list