Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would want to use the Qgis api for custom desktop application. When I imported the qgis.core module, I get the following error

>>> import qgis.core 
Traceback (most recent call last):   
File "<stdin>", line 1, in <module> 
ImportError: DLL load failed: The
specified module could not be found.

A similar error was reported in the forums,im not sure if the exact solution was reached.

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

Forums do suggest that I would have to use the OSGeo Version of python. How would i get to choose the version of python to use?

I think this could be a path or a pythonpath.Have given my path and python path information below.Let me know if I had missed any of the directories that should be added for qgis core to get its dependencies met.

PATH=C:\Python26;C:\Python26\Scripts;C:\Python26\ArcGIS10.0;C:\Python26\ArcGIS10.0\Scripts;C:\OSGeo4W\apps\qgis-dev\bin

PYTHONPATH=C:\Python26;C:\OSGeo4W\apps\qgis\python;C:\OSGeo4W\apps\python27;C:\Python26\ArcGIS10.0;C:\Python26\Lib\site-packages

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Try using the hints provided in command-line-environment-setup to set up your shell properly before launching your application.

Regards

Tim

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.