>>> from PyQt4.QtCore import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PyQt4.QtCore
我一直在試圖安裝PyQt4.QtWebKit,但遇到了問題。我跟着這些instructions。安裝PyQt4在Ubuntu 11.04和Python 2.7+錯誤
我可以安裝(./configure,make,make install)SIP。我無法在PyQt中做到這一點。
錯誤是:
[email protected]:~/Desktop/build/PyQt$ sudo python configure.py --verbose -q /usr/bin/qmake
Determining the layout of your Qt installation...
/usr/bin/qmake -o qtdirs.mk qtdirs.pro
make -f qtdirs.mk
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -o qtdirs.o qtdirs.cpp
qtdirs.cpp:1:28: fatal error: QCoreApplication: No such file or directory
compilation terminated.
make: *** [qtdirs.o] Error 1
Error: Failed to determine the layout of your Qt installation. Try again using
the --verbose flag to see more detail about the problem.
[email protected]:~/Desktop/build/PyQt$
可否請你建議安裝PyQt4的成功在Ubuntu軟件包詳細信息(11.04)和Python 2.7+的解決方案?
我很好奇爲什麼在使用apt-get python-qt4之後,額外的手動安裝pyqt是necc。這不是與pyqt一起安裝qt4嗎?你是否試圖安裝它不是Ubuntu默認的python版本?你的錯誤建議qt實際上並沒有成功建立 – jdi 2011-12-21 19:38:00
我的意思是沒有使用apt-get install python-qt4我試過了。想要嘗試下載package.qt構建問題? – Nava 2011-12-21 19:45:31