Sunday, 6 September 2015

How to import qgis.core to Python app?


I'm new to Python. I want to create GIS app with Python using QGIS library on Window 7 64 bit.


The way I do:


install QGIS 1.7.0



  • I set PYTHONPATH=D:\Program Files (x86)\Quantum GIS Wroclaw\apps\qgis\python

  • I run python from cmd in D:\Program Files (x86)\Quantum GIS Wroclaw\bin

  • I type import qgis.core, a pop up window appear with text




The program can't start because qgis_core.dll is missing from your computer. Try reinstalling the program to fix this problem



and text in cmd is



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



Can anyone help me?



Answer



Reinstall QGIS with OSGeo4W installer, it has everything you need to develop already set up. http://trac.osgeo.org/osgeo4w/



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...