3

This question already has an answer here:

I am trying to develop a GIS application in QGIS using the Python language. Unfortunately, I encountered a problem from the outset is that of import and qgis.core qgis.gui. the Problem in the python console is as follows:

import qgis.core

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import qgis.core
ImportError: DLL load failed: Le module spécifié est introuvable.

I am using:

  • OS : Windows 7 , 32 bits
  • QGIS : 1.8 ( Lisbona )
  • Python : python 2.7

marked as duplicate by R.K., PolyGeo, Fezter, Ian Turton Jul 17 '13 at 7:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    As that for a stand-alone python application or for a QGIS python plugin/script? – underdark Jul 15 '13 at 16:06
  • that's for a stand-alone python application using qgis lib . – EmuNasa Jul 17 '13 at 2:38
  • j'ai déja essayé tout ça . mais en vain !! (*) j'ai pas installer OSGeo : c'est juste Qgis ( Lisbona ) . l'installation de OsGeo me semble trés lente parfois elle arrive à 2h sans terminer . – EmuNasa Jul 17 '13 at 2:44
0

PYTHONPATH must be set to "path to qgis"\python (C:\OSGeo4W\apps\qgis\python) and PATH to "path to qgis"\bin;"path to qgis"\python

Then you can launch python from the commandline and

import PyQt4.QtCore
import PyQt4.QtGui
import qgis.core
import qgis.gui

should not raise any error.

  • j'ai déja essayé tout ça . mais en vain !! (*) j'ai pas installer OSGeo : c'est juste Qgis ( Lisbona ) . l'installation de OsGeo me semble trés lente parfois elle arrive à 2h sans terminer . – EmuNasa Jul 17 '13 at 2:41
  • 3
    Welcome to GIS SE! As this site is for an international audience, please do write in English. Thank you. – R.K. Jul 17 '13 at 3:02

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