<div dir="ltr">On Sun, Mar 1, 2015 at 9:24 PM, Florian Bruhin <span dir="ltr"><<a href="mailto:me@the-compiler.org" target="_blank">me@the-compiler.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">* • <<a href="mailto:rfc469@gmail.com" target="_blank">rfc469@gmail.com</a>> [2015-03-01 19:58:25 -0800]:<br>
<span>> I'm trying to install the latest sip (4.16.6) and the latest PyQt5 (5.4.1)<br>
> with the latest official Qt release (5.4.1). This is on a mac running<br>
> Yosemite 10.10.2. Everything seems to install and compile normally, but I<br>
> can't import any modules:<br>
><br>
> Python 3.3.3 (default, Feb 14 2015, 12:23:25)<br>
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin<br>
> Type "help", "copyright", "credits" or "license" for more information.<br>
> >>> import PyQt5<br>
> >>> from PyQt5 import QtCore<br>
> Traceback (most recent call last):<br>
> File "<stdin>", line 1, in <module><br>
> ImportError: cannot import name QtCore<br>
><br>
> The modules were installed as .so files under here:<br>
> /opt/gentoo/lib/python3.3/site-packages/PyQt5<br>
<br>
</span>What python binary are you running? Does it have<br>
/opt/gentoo/lib/python3.3/site-packages/PyQt5 in its sys.path? You can<br>
check like this:<br>
<br>
import sys<br>
print(sys.path)<br>
<br>
FWIW, I always install PyQt via Homebrew on OS X which works great for<br>
me.<br>
<span><font color="#888888"><br>
Florian<br>
<br></font></span></blockquote><div><br></div><div>It's installed for both <span style="font-size:13px">python 3.3.3 and 2.7.8, and I get the same error for both.</span></div><div><br></div><div>Yes, the sys.path includes site-packages:</div><div>/opt/gentoo/usr/lib/python3.3/site-packages<br></div><div><br></div><div>I tried adding the PyQt5 subdir and no change. But isn't site-packages only for python files, not .so files? There are no python files under the PyQt5 subdir except the __init__.p[y,c,o] and __pycache__. The rest are .so files, for example QtCore.so.</div><div><br></div><div>I've heard good things about Homebrew but have been using Gentoo for awhile.</div></div></div></div>