ImportError:构建QGIS时没有名为PyQt4的模块

时间:2015-10-29 10:30:58

标签: python-2.7 qgis

建立" ALL_BUILD"在Visual Studio 10 Express中我收到此错误

219>------ Rebuild All started: Project: pyconsole, Configuration: Release Win32 ------
219>  Building Custom Rule D:/QGIS/python/console/CMakeLists.txt
211>  qgsgeoreftoolmovepoint.cpp
219>  Traceback (most recent call last):
219>    File "C:\OSGeo4W\apps\Python27\lib\site-packages\PyQt4\uic\pyuic.py", line 31, in <module>
219>      from PyQt4 import QtCore
219>  ImportError: No module named PyQt4

pyuic.py中出现错误的代码如下所示:

28 import sys
29 import optparse

31 from PyQt4 import QtCore
32 from PyQt4.uic.driver import Driver

但我可以在C:\ OSGeo4W \ apps \ Python27 \ Lib \ site-packages \ PyQt4文件夹中看到QtCore.pyd文件。

不知道为什么会给出错误。

1 个答案:

答案 0 :(得分:-2)

我找到了针对ImportError的解决方案:没有名为PyQt4的模块

  • Python 2.7.11
  • PyQt GPL 4.10.4
  • MySQL的

enter image description here