Hi

These notes are for QGIS 2.x but the process should be similar:

https://github.com/inasafe/inasafe/wiki/Development-under-Windows#create-a-shell-launcher

Hope that helps

Regards

Tim

> On 6 Sep 2019, at 15:35, Trs Bar <[email protected]> wrote:
> 
> I'm new to GIS but i've already a signifiant experience in development. I 
> work on new project. We're trying to use the power of Qgis to create a GIS 
> tool for our commercial team. QGis is istalled from OSGeo4W (3.8), Python 
> (3.7) and PyQt (from pip) are installed too.
> 
> Correctly set PYTHONPATH :
> 
> set PYTHONPATH=C:\OSGeo4W64\apps\qgis\python
> When i try to run my python script (copied from the official documentation 
> "PyQGIS Developper Cookbook"), we've got an error :
> 
> from qgis.core import *
> 
> # Supply path to qgis install location
> QgsApplication.setPrefixPath("C:\OSGeo4W64\apps\qgis", True)
> 
> # Create a reference to the QgsApplication.  Setting the
> # second argument to False disables the GUI.
> qgs = QgsApplication([], False)
> 
> # Load providers
> qgs.initQgis()
> 
> # Write your code here to load some layers, use processing
> # algorithms, etc.
> 
> # Finally, exitQgis() is called to remove the
> # provider and layer registries from memory
> 
> qgs.exitQgis()
> 
> Erreur :
> ImportError: DLL load failed: %1 n’est pas une application Win32 valide.
> 
> Could you maybe help me ?
> _______________________________________________
> QGIS-Developer mailing list
> [email protected]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

—









Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com <http://kartoza.com/> to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net

I'd love to connect. Here's my calendar link <https://calendly.com/timlinux> to 
make finding time easy.

_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to