[PyQt] ImportError: cannot import name QtCore

Florian Bruhin me at the-compiler.org
Mon Mar 2 05:24:20 GMT 2015


* • <rfc469 at gmail.com> [2015-03-01 19:58:25 -0800]:
> I'm trying to install the latest sip (4.16.6) and the latest PyQt5 (5.4.1)
> with the latest official Qt release (5.4.1). This is on a mac running
> Yosemite 10.10.2. Everything seems to install and compile normally, but I
> can't import any modules:
> 
> Python 3.3.3 (default, Feb 14 2015, 12:23:25)
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import PyQt5
> >>> from PyQt5 import QtCore
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: cannot import name QtCore
> 
> The modules were installed as .so files under here:
> /opt/gentoo/lib/python3.3/site-packages/PyQt5

What python binary are you running? Does it have
/opt/gentoo/lib/python3.3/site-packages/PyQt5 in its sys.path? You can
check like this:

import sys
print(sys.path)

FWIW, I always install PyQt via Homebrew on OS X which works great for
me.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150302/7fdb236b/attachment.sig>


More information about the PyQt mailing list