View Single Post
Old 08-19-2014, 04:02 AM   #1
silentfuzzle
Junior Member
silentfuzzle began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2014
Device: none
Question No module named PyQt5.Qt

Hi,

I forked the calibre source code five months ago. Last night, I decided to merge the changes to the master with the modifications I've been making to my fork. Naturally, a lot has changed in the past five months, including the change from PyQt4 to PyQt5. When running the calibre ebook reader in debug mode in the console, I'm now getting this message:

Python function terminated unexpectedly
No module named PyQt5.Qt (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "C:\Users\Emily\My Documents\GitHub\calibre\src\calibre\debug.py", line 2
36, in main
from calibre.gui2.viewer.main import main
File "C:\Users\Emily\My Documents\GitHub\calibre\src\calibre\gui2\__init__ .py"
, line 7, in <module>
from PyQt5.Qt import (
ImportError: No module named PyQt5.Qt

Similarly, if I try to run calibre or the calibre ebook viewer from the Start menu, I get an error message that says:

Python function terminated unexpectedly
No module named PyQt5.Qt (Error Code: 1)

I'm using Windows 7 x64. At the time I first got these messages, I had Python(x,y) installed, which used Python 2.7. I hunted down where to download and install PyQt5, but of course, the Windows installer was only for Python 3.4. I attempted to manually compile and build PyQt5, but, being the Python novice that I am, I grew frustrated and ended up downloading Python 3.4 and using the PyQt5 Windows installer.

In the Python 3.4 interpreter, PyQt5 seemed to have installed just fine. For example, "from PyQt5 import Qt" executes without error. When attempting to open the calibre interface, however, I'm still getting the error messages above. I've tried adding and modifying system paths from c:\Python27 to c:\Python34 to no avail.

This might be a simple Python question, but am I missing a system path or something? Why can't calibre find PyQt5?
silentfuzzle is offline   Reply With Quote