Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error :No module named qgis

Tags:

python

qgis

pyqt

I am working on Python26,pyqt4 designer and QGIS. My code file (.py file)contains this:

   import sys
   from PyQt4 import QtGui, QtCore
   from qgis.core import *
   from qgis.gui import *

but when i try to run it it gives error saying:

Traceback (most recent call last):
  File "C:\rt_sql_layer_working\DlgQueryBuilder.py", line 29, in <module>
    from qgis import core,gui
ImportError: No module named qgis

I already set PATH in environmental variable as

C:\Program Files\Quantum GIS Wroclaw\bin
C:\Program Files\Quantum GIS Wroclaw\apps\qgis\bin
like image 632
poonam Avatar asked Jan 19 '12 07:01

poonam


1 Answers

If you set just PATH instead of PYTHONPATH, my advice would be to check if the location of the module you want to import is in the PYTHONPATH and, if that's not the case, set the PYTHONPATH appropriately.

like image 127
jcollado Avatar answered Sep 19 '22 00:09

jcollado