[Qgis-developer] RE: DLL not found in XP

Echavarria Gregory, Maria Angelica m.echavarriagregory at umiami.edu
Wed Oct 14 14:18:24 EDT 2009


HOW I FINALLY SOLVED THE DLL PROBLEM (in case somebody gets annoyed by the same issue)

After trying all the versions available for windows machines, my last chance was the complete OSGeo4W package by recommendation of a nice web page for Spanish-speaking GIS users http://geotux.tuxfamily.org (thanks German Carrillo). Then I stopped using my pre-installed Python25 version and started using the Python25 that comes with the OSGeo4W distribution, typing right inside the OSGeo4W console. Then I installed in my new OSGeo4W/apps/Python25/Lib/site-packages directory all the python packages that my application needs, as if it was my old nice own-compiled python environment (with which one gets stubborn and tends no to abort it when trouble arise!). Then I put my application folder inside new Python's "Scripts" folder, just to be conservative... Up to here, the DLLs still did not load correctly but this time OSGeo4W gave me their NAMES!. Then I copied the required DLLs in the Python folder (as if I had compiled the package from source) and VOILA! it worked. I executed my PyQt application from the OSGeo4W console and the main window, pop-ups, search and load files, graphicViews, all worked nice. Now I have to use PyQGIS for replacing that graphicViews by canvases, which is all I needed...
NOTE: I tried the same copy of DLLs when installing the non-OSGeo4W package in another XP machine and it did not work...

That's all folks,

M. Angelica Echavarria-Gregory,
Ph.D Candidate
University of Miami
Phone 305 284-3611
________________________________________
From: Echavarria Gregory, Maria Angelica
Sent: Monday, October 12, 2009 9:41 PM
To: qgis-developer at lists.osgeo.org
Subject: DLL not found

DEAR DEVELOPERS:

My error message when doing "from qgis.core import * " looks dumb but have not been able to crack it!!

ImportError: DLL load failed: The specified module could not be found.

I have my application ready to run. All your examples in the blog are being refused by the same DLL cause at the same line (even if I change the prefix, set the environment variables, add directories to my path, or run a .bat file that loads the variables). I have Python25 (PyWin32), Numpy, Scipy, etc, and PyQt 4.3 previously installed in my windows XP machine... is it a problem for QGIS to have all those previously installed? should I uninstall my Python to use the binary?

When I execute PyQgis applications from the Python console that comes inside QGIS they DO PASS THE IMPORT LINE OF THE TROUBLE. So where in my installation you think the problem is?

Thank you,
Angelica.

M. Angelica Echavarria-Gregory
Ph.D Candidate
University of Miami
Phone 305 284-3611


More information about the Qgis-developer mailing list