I am working with PyQT4 designer and Python 2.5 for python qgis plugins. when i try command

from qgis.core import * 

in python2.5 ,it gives me error saying

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

I installed PyQt-Py2.5-x86-gpl-4.8.6-1.exe, python-2.5.msi and QGIS-OSGeo4W-1.7.2-659859c-Setup.exe.

what can be the problem?? Where to paste qgis_core.dll??

有帮助吗?

解决方案

Since it's qgis_core.dll, you are working on windows. Set the env variable PYTHONHOME to point to the qgis dll dir:

set PYTHONHOME=C:\Python25\Lib\site-packages;C:\PATH\TO\QGIS\PYTHONDLL;

It's better than moving dlls around.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top