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 installed QGIS 1.7.3 using OSGeo4W installer.I have python 2.7 and pyqt4-py2.7 installed on my system.My system paths are:

PATH:C:\OSGeo4W\apps\Python27\Lib\site-packages\PyQt4\uic;C:\Python27\Lib\site-packages\PyQt4;C:\OSGeo4W\apps\qgis\bin;C:\OSGeo4W\bin;

PYTHONPATH:C:\OSGeo4W\apps\qgis\python

When i try to run my .py files i get following error:

RuntimeError: the PyQt4.QtCore module is version 1 but the qgis.core module requires version -1.

what can be the problem?

share|improve this question
    
does this still appear in 1.8? –  underdark Jul 26 '12 at 19:05
add comment

2 Answers 2

it s not that hard to generate the ui file(.ui) to the python file(.py) , on Windows; just open the cmd ( start --> run --> cmd ), go into the directory that your file is in, then type "pyuic4 your_filename.ui -o your_filename.py"

I hope this help......sele(Nigeria)

share|improve this answer
add comment

Despite having its own installation of python and the associated add-ons, QGIS still seems to search the paths and try to use any manually installed version of some modules. I had the same issue with GDAL. My only way around it was to remove my 'external' version of GDAL so QGIS could use its own one.

Your issue sounds similar. I don't have another version of QT installed and don't get your error. You do, and get an error. I'd try uninstalling pyqt and see if QGIS still returns an error. If not you then know it is down to your manually installed version. Of course, that doesn't help you if you specifically need to use the version you installed outside of QGIS - like I do with GDAL :(

QGIS is a great program so I hope the developers crack these issues soon!

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.