[PyQt] PyQt4 installed into different dir than sip and not importable on MacOSX

Andreas Pakulat apaku at gmx.de
Sun Mar 22 09:25:07 GMT 2015

Hi Phil,

On Sat, Mar 21, 2015 at 10:39 AM, Phil Thompson <phil at riverbankcomputing.com
> wrote:

> On 21/03/2015 8:29 am, Andreas Pakulat wrote:
>> Hi Phil,
>> On Fri, Mar 20, 2015 at 10:39 PM, Phil Thompson <
>> phil at riverbankcomputing.com
>>> wrote:
>>  On 20/03/2015 8:44 pm, Andreas Pakulat wrote:
>>>  Hi,
>>>> just installed the latest PyQt4 release (4.11.3) on MacOSX and could not
>>>> impot PyQt4 afterwards in python. Turns out it decided to place itself
>>>> into
>>>> /System/Library/Frameworks/Python.framework/Versions/2.7/
>>>> lib/python2.7/site-packages,
>>>> however that directory is not in sys.path after starting Python.
>>>> sip on the other hand (installed just before, version is 4.16.6) put
>>>> itself
>>>> into /Library/Python/2.7/site-packages and that is part of sys.path.
>>>> I guess this isn't intended? Where does PyQt gather the default
>>>> installation directory from?
>>>> Andreas
>>>> PS: Passing -d /Library/Python/2.7/site-packages worked fine of course.
>>> The /System/... location is for python that ships with OS X. The
>>> /Library/... location is for the python from python.org.
>>> Are you sure you used the same python throughout?
>> Yes very sure since I did not have a python from python.org when I tried
>> first time. Explicitly starting python through
>> /System/Library/FrameWorks/Python.framework/Versions/2.7/bin/python and
>> fetching sys.path still shows no site-packages under the /System/
>> hierarchy, but the one from /Library.
>> I've meanwhile installed pip using the System python and that was placed
>> in
>> /Library as well.
>> However I do notice now that my /usr/bin/python is slightly larger than
>> the
>> python2.7 binary. No idea wether thats normal or not (a hunch tells me
>> this
>> is because that one reads out some OSX config to determine which Python I
>> want as default), but at least the dates of the two are matching (Sep 10th
>> 2014)
>> All this is on a fresh OSX 10.10.
> I assume you are using configure-ng.py.

yes, I'm using configure-ng.py.

> Can you try with the current PyQt4 snapshot? I suspect that it has already
> been fixed.

I just tried PyQt-mac-gpl-4.11.4-snapshot-265be2eab2fa and indeed it seems
to pick /Library/Python/2.7/site-packages as default installation
directory. So unless there's some global cache of this I think the issue is
fixed for 4.11.4 already :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150322/794d2ba5/attachment.html>

More information about the PyQt mailing list