Search code examples
pythonimporterrorspynner

"ImportError: No module named PyQt42


I am trying to import spynner into my python program (import spynner) ... when I run the script, I receive the following error message:

  Traceback (most recent call last):
  File "C:\Users\Michael\Desktop\webscraper.py", line 2, in <module>
    import spynner
  File "build\bdist.win32\egg\spynner\__init__.py", line 2, in <module>
  File "build\bdist.win32\egg\spynner\browser.py", line 52, in <module>
  ImportError: No module named PyQt4

I then tried to install this module called PyQt4 (pip install PyQt4), which resulted in the following error message:

Could not find any downloads that satisfy the requirement Pyqt4

How can this problem be solved?


Solution

  • PyQt is available for download from Riverbank.

    You can get PyQt4 here: http://www.riverbankcomputing.com/software/pyqt/download

    They have links to both the source (so you can build it yourself) or binary packages.

    If you need the PyQt documentation for the various classes the framework provides, you get get that from here