我尝试安装spynner python 模块的依赖项,但我得到:
$ python -c 'import spynner'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/spynner-1.11dev-py2.7.egg/spynner/__init__.py", line 2, in <module>
from browser import *
File "/usr/local/lib/python2.7/dist-packages/spynner-1.11dev-py2.7.egg/spynner/browser.py", line 35, in <module>
from PyQt4.QtCore import SIGNAL, QUrl, QString, Qt, QEvent
ImportError: No module named QtCore
这是我安装的与 QT 匹配的软件包:
$ dpkg -l | grep -i qt
ii appmenu-qt 0.2.2-0ubuntu1.1 appmenu support for Qt
ii ibus-qt4 1.3.1-1ubuntu3 qt-immodule for ibus (QT4)
ii libibus-qt1 1.3.1-1ubuntu3 qt-immodule for ibus (QT4)
ii libindicate-qt1 0.2.5.91-1ubuntu2 Qt bindings for libindicate
ii libpyside1.0 1.0.6.1-2ubuntu2 Python bindings for Qt 4 (base files)
ii libqt3-compat-headers 3:3.3.8-b-8ubuntu1 Qt 1.x and 2.x compatibility includes
ii libqt3-headers 3:3.3.8-b-8ubuntu1 Qt3 header files
ii libqt3-mt 3:3.3.8-b-8ubuntu1 Qt GUI Library (Threaded runtime version), Version 3
ii libqt3-mt-dev 3:3.3.8-b-8ubuntu1 Qt development files (Threaded)
ii libqt4-dbus 4:4.7.4-0ubuntu8.1 Qt 4 D-Bus module
ii libqt4-declarative 4:4.7.4-0ubuntu8.1 Qt 4 Declarative module
ii libqt4-designer 4:4.7.4-0ubuntu8.1 Qt 4 designer module
ii libqt4-dev 4:4.7.4-0ubuntu8.1 Qt 4 development files
ii libqt4-help 4:4.7.4-0ubuntu8.1 Qt 4 help module
ii libqt4-network 4:4.7.4-0ubuntu8.1 Qt 4 network module
ii libqt4-opengl 4:4.7.4-0ubuntu8.1 Qt 4 OpenGL module
ii libqt4-opengl-dev 4:4.7.4-0ubuntu8.1 Qt 4 OpenGL library development files
ii libqt4-qt3support 4:4.7.4-0ubuntu8.1 Qt 3 compatibility library for Qt 4
ii libqt4-script 4:4.7.4-0ubuntu8.1 Qt 4 script module
ii libqt4-scripttools 4:4.7.4-0ubuntu8.1 Qt 4 script tools module
ii libqt4-sql 4:4.7.4-0ubuntu8.1 Qt 4 SQL module
ii libqt4-sql-mysql 4:4.7.4-0ubuntu8.1 Qt 4 MySQL database driver
ii libqt4-sql-sqlite 4:4.7.4-0ubuntu8.1 Qt 4 SQLite 3 database driver
ii libqt4-svg 4:4.7.4-0ubuntu8.1 Qt 4 SVG module
ii libqt4-test 4:4.7.4-0ubuntu8.1 Qt 4 test module
ii libqt4-webkit 4:4.7.4-0ubuntu8.1 transitional package for Qt 4 WebKit module
ii libqt4-xml 4:4.7.4-0ubuntu8.1 Qt 4 XML module
ii libqt4-xmlpatterns 4:4.7.4-0ubuntu8.1 Qt 4 XML patterns module
ii libqtassistantclient4 4.6.3-3ubuntu1 Qt Assistant client library (runtime)
ii libqtcore4 4:4.7.4-0ubuntu8.1 Qt 4 core module
ii libqtglib-2.0-0 0.10.1-2ubuntu3 C++ bindings library for GLib and GObject with a Qt-style API
ii libqtgstreamer-0.10-0 0.10.1-2ubuntu3 C++ bindings library for GStreamer with a Qt-style API
ii libqtgui4 4:4.7.4-0ubuntu8.1 Qt 4 GUI module
ii libqtscript4-core 0.1.0+git20101026+8b191fbc-2 Qt Script bindings for the Qt 4 Core library
ii libqtscript4-gui 0.1.0+git20101026+8b191fbc-2 Qt Script bindings for the Qt 4 Gui library
ii libqtscript4-network 0.1.0+git20101026+8b191fbc-2 Qt Script bindings for the Qt 4 Network library
ii libqtscript4-sql 0.1.0+git20101026+8b191fbc-2 Qt Script bindings for the Qt 4 SQL library
ii libqtscript4-uitools 0.1.0+git20101026+8b191fbc-2 Qt Script bindings for the Qt 4 UiTools library
ii libqtscript4-xml 0.1.0+git20101026+8b191fbc-2 Qt Script bindings for the Qt 4 XML library
ii libqtwebkit-dev 2.2~2011week36-0ubuntu1 Web content engine library for Qt - development files
ii libqtwebkit4 2.2~2011week36-0ubuntu1 Web content engine library for Qt
ii pinentry-qt4 0.8.1-1ubuntu1 Qt-4-based PIN or pass-phrase entry dialog for GnuPG
ii pyqt-tools 3.18.1-4ubuntu3 pyuic and pylupdate for Qt3
ii pyqt4-dev-tools 4.8.5-0ubuntu2 Development tools for PyQt4
ii python-pyside.qtcore 1.0.6.1-2ubuntu2 Qt 4 core module - Python bindings
ii python-qt4 4.8.5-0ubuntu2 Python bindings for Qt4
ii python-qt4-dbus 4.8.5-0ubuntu2 DBus Support for PyQt4
ii python-qt4-dev 4.8.5-0ubuntu2 Development files for PyQt4
ii python-qt4-gl 4.8.5-0ubuntu2 Python bindings for Qt4's OpenGL module
ii qdbus 4:4.7.4-0ubuntu8.1 Qt 4 Dbus Tool
ii qt3-dev-tools 3:3.3.8-b-8ubuntu1 Qt3 development tools
ii qt4-designer 4:4.7.4-0ubuntu8.1 graphical designer for Qt 4 applications
ii qt4-linguist-tools 4:4.7.4-0ubuntu8.1 Qt 4 Linguist tools
ii qt4-qmake 4:4.7.4-0ubuntu8.1 Qt 4 qmake Makefile generator tool
使用pip
or easy-install
,这不起作用:
# pip install PyQt
Downloading/unpacking PyQt
Downloading PyQt-x11-gpl-4.9.1.tar.gz (9.7Mb): 9.7Mb downloaded
Running setup.py egg_info for package PyQt
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/home/sputnick/build/PyQt/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/home/sputnick/build/PyQt/setup.py'
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /root/.pip/pip.log
日志文件:
# cat /root/.pip/pip.log
------------------------------------------------------------
/usr/bin/pip run on Wed Jun 13 16:00:41 2012
Downloading/unpacking PyQt
Getting page http://pypi.python.org/simple/PyQt
URLs to search for versions for PyQt:
* http://pypi.python.org/simple/PyQt/
Getting page http://www.riverbankcomputing.com/software/pyqt/
Getting page http://www.riverbankcomputing.com/software/pyqt/download
Analyzing links from page http://pypi.python.org/simple/PyQt/
Skipping link http://www.riverbankcomputing.com/software/pyqt/ (from http://pypi.python.org/simple/PyQt/); not a file
Skipping link http://www.riverbankcomputing.com/software/pyqt/download (from http://pypi.python.org/simple/PyQt/); not a file
Analyzing links from page http://www.riverbankcomputing.com/software/pyqt/intro
Skipping link http://www.riverbankcomputing.com/software/pyqt/intro/index.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link http://www.riverbankcomputing.com/@@/resources/riverbank.css (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .css
Skipping link http://www.riverbankcomputing.com/@@/resources/logo_tn.png (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .png
Skipping link http://yui.yahooapis.com/2.5.2/build/menu/assets/skins/sam/menu.css (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .css
Skipping link http://www.riverbankcomputing.com/software/pyqt/intro/@@rcl_login.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link http://qt.nokia.com (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/commercial/buy (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.sqlite.org (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://webkit.org/ (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.freedesktop.org/wiki/Software/DBusBindings (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://qt.nokia.com/ (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.python.org/ (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.qtsoftware.com/products/appdev/developer-tools (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/sip (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/pyqt/whitepaper (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://qt.nokia.com/services-partners/partners/partner-directory/riverbank-computing (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/news/dip-0.4 (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .4
Skipping link http://www.riverbankcomputing.com/news/pyqt-491 (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/news/qscintilla-261 (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/news/sip-4132 (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/news/pyqt-49 (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/pyqtmobility/download (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/qscintilla/download (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/sip/download (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/vendorid/download (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/dip/download (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/pykde/download3 (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/pyqt/download3 (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/software/qscintilla/download1 (from http://www.riverbankcomputing.com/software/pyqt/intro); not a file
Skipping link http://www.riverbankcomputing.com/static/Docs/PyQt4/html/classes.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link http://www.riverbankcomputing.com/static/Docs/PyQt4/html/index.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link http://www.riverbankcomputing.com/static/Docs/QScintilla2/index.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link http://www.riverbankcomputing.com/static/Docs/sip4/index.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link http://www.riverbankcomputing.com/static/Docs/VendorID/vendorid.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link http://www.riverbankcomputing.com/static/Docs/dip/index.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link http://www.riverbankcomputing.com/static/Docs/PyKDE3/index.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link http://www.riverbankcomputing.com/static/Docs/PyQt3/PyQt.html (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .html
Skipping link mailto:info@riverbankcomputing.com (from http://www.riverbankcomputing.com/software/pyqt/intro); unknown archive format: .com
Analyzing links from page http://www.riverbankcomputing.com/software/pyqt/download
Skipping link http://www.riverbankcomputing.com/software/pyqt/download/index.html (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .html
Skipping link http://www.riverbankcomputing.com/software/pyqt/download/@@rcl_login.html (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .html
Found link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-x11-gpl-4.9.1.tar.gz (from http://www.riverbankcomputing.com/software/pyqt/download), version: x11-gpl-4.9.1
Found link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-win-gpl-4.9.1.zip (from http://www.riverbankcomputing.com/software/pyqt/download), version: win-gpl-4.9.1
Found link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-mac-gpl-4.9.1.tar.gz (from http://www.riverbankcomputing.com/software/pyqt/download), version: mac-gpl-4.9.1
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/ChangeLog (from http://www.riverbankcomputing.com/software/pyqt/download); not a file
Skipping link http://doc.trolltech.com/ (from http://www.riverbankcomputing.com/software/pyqt/download); not a file
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py3.2-x86-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py3.2-x64-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py3.1-x86-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py3.1-x64-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py2.7-x86-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py2.7-x64-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py2.6-x86-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py2.6-x64-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py2.5-x86-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-Py2.5-x64-gpl-4.9.1-1.exe (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .exe
Found link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-x11-gpl-snapshot-4.9.2-93480e10d581.tar.gz (from http://www.riverbankcomputing.com/software/pyqt/download), version: x11-gpl-snapshot-4.9.2-93480e10d581
Found link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-win-gpl-snapshot-4.9.2-93480e10d581.zip (from http://www.riverbankcomputing.com/software/pyqt/download), version: win-gpl-snapshot-4.9.2-93480e10d581
Found link http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-mac-gpl-snapshot-4.9.2-93480e10d581.tar.gz (from http://www.riverbankcomputing.com/software/pyqt/download), version: mac-gpl-snapshot-4.9.2-93480e10d581
Skipping link http://www.riverbankcomputing.com/static/Downloads/PyQt4/ChangeLog-snapshot-4.9.2-93480e10d581 (from http://www.riverbankcomputing.com/software/pyqt/download); unknown archive format: .2-93480e10d581
Using version x11-gpl-4.9.1 (newest of versions: x11-gpl-4.9.1, x11-gpl-snapshot-4.9.2-93480e10d581, win-gpl-4.9.1, win-gpl-snapshot-4.9.2-93480e10d581, mac-gpl-4.9.1, mac-gpl-snapshot-4.9.2-93480e10d581)
Downloading from URL http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-x11-gpl-4.9.1.tar.gz (from http://www.riverbankcomputing.com/software/pyqt/download)
Running setup.py egg_info for package PyQt
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/home/sputnick/build/PyQt/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/home/sputnick/build/PyQt/setup.py'
----------------------------------------
Command python setup.py egg_info failed with error code 1
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 980, in prepare_files
req_to_install.run_egg_info()
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 216, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 255, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command python setup.py egg_info failed with error code 1
简易安装:
# easy_install PyQt
Searching for PyQt
Reading http://pypi.python.org/simple/PyQt/
Reading http://www.riverbankcomputing.com/software/pyqt/
Reading http://www.riverbankcomputing.com/software/pyqt/download
Best match: PyQt x11-gpl-4.9.1
Downloading http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-x11-gpl-4.9.1.tar.gz
Processing PyQt-x11-gpl-4.9.1.tar.gz
error: Couldn't find a setup script in /tmp/easy_install-kO3Str/PyQt-x11-gpl-4.9.1.tar.gz
http://pypi.python.org/pypi/spynner#dependencies说我需要pyQt,但我很确定我自己没有任何东西要编译。有什么提示吗?