0

I'm trying to setup Ghost.py and I need PyQt4 for it.

I've downloaded PyQt-x11-gpl-4.11.3 version and used configure-ng.py with Python-3.4.2, of course did make and make install.

Sadly, I'm getting an error ImportError: No module named 'PyQt4.QtWebKit' while trying to from ghost import Ghost.

Can't figure out how do I build QtWebKit.

Thank you for any useful input!

Fred
  • 103
  • 3
  • 14
  • Does the system you are building on have the necessary qt webkit dev packages installed? Run `configure-ng.py` with the `--verbose` flag and see what errors it gives when trying to generate the source for the webkit modules. The output will also give a list of all the modules that wil be built. – ekhumoro Apr 08 '15 at 19:53
  • This is what I get http://pastebin.com/VhZgTy3Z – Fred Apr 08 '15 at 19:58
  • See lines 67-69 and lines 91-92. So it's exactly as I said: you need to install the necessary qt dev packages before building pyqt. – ekhumoro Apr 08 '15 at 20:03
  • What qt dev exactly? Only for PyQt4? – Fred Apr 08 '15 at 20:18
  • Qt is modular. Clearly, not all of the modules are currently installed on your system. You need to install the packages that include the qt4-webkit modules, as well as the qt4-webkit-dev packages (which contain all the header files). – ekhumoro Apr 08 '15 at 20:43
  • I even did `apt-get install libqt4-*` and there are still errors like `Project ERROR: Unknown module(s) in QT: webkitwidgets webkit` – Fred Apr 08 '15 at 21:05
  • If you're on ubuntu, you just need `libqt4-webkit` and `libqt4-dev`. Looking again at your output, it also appears you aren't specifying the correct `qmake`, as all the file paths are pointing at qt5. So use the `--qmake` flag to specify the full path to `qmake-qt4` (or whatever it's called on your system). – ekhumoro Apr 08 '15 at 22:10
  • I have `libqt4-webkit` and `libqt4-dev`. I run command: `python3 configure-ng.py --qmake /usr/lib/x86_64-linux-gnu/qt4/bin/qmake` and from my output I can't see that QtWebKit will be build.. `These PyQt4 modules will be built: QtCore, QtGui, QtHelp, QtNetwork, QtDeclarative, QtScript, QtScriptTools, QtXml, QtOpenGL, QtSql, QtSvg, QtTest, QtXmlPatterns, phonon, QtDesigner, QtDBus.` – Fred Apr 09 '15 at 15:45
  • Here's output with `--verbose` http://pastebin.com/cxCqkB6f – Fred Apr 09 '15 at 15:54
  • Does the file `/usr/include/qt4/QtWebKit/qwebpage.h` exist on your system? – ekhumoro Apr 09 '15 at 17:17
  • QtWebKit directory doesn't exist in `/usr/include/qt4/` – Fred Apr 09 '15 at 17:20
  • What version of ubuntu are you using? It would be a bug if there's a `libqt4-webkit` package, but no header files provided for it. – ekhumoro Apr 09 '15 at 17:22
  • Ubuntu 14.04 LTS `Linux 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015` But I believe I have upgraded libc6 before. EDIT: Reinstalled `libqt4-webkit` and nothing changed. – Fred Apr 09 '15 at 17:26
  • 2
    According to the [ubuntu package search](http://packages.ubuntu.com/), the webkit headers are in a separate package - try installing `libqtwebkit-dev`. – ekhumoro Apr 09 '15 at 17:34
  • Finally! `These PyQt4 modules will be built: QtCore, QtGui, QtHelp, QtNetwork, QtDeclarative, QtScript, QtScriptTools, QtXml, QtOpenGL, QtSql, QtSvg, QtTest, QtWebKit, QtXmlPatterns, phonon, QtDesigner, QtDBus.` Thanks alot! – Fred Apr 09 '15 at 17:41

0 Answers0