From pykde Sun Mar 22 09:25:07 2015 From: Andreas Pakulat Date: Sun, 22 Mar 2015 09:25:07 +0000 To: pykde Subject: Re: [PyQt] PyQt4 installed into different dir than sip and not importable on MacOSX Message-Id: X-MARC-Message: https://marc.info/?l=pykde&m=142701640110529 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============3665486427223949757==" --===============3665486427223949757== Content-Type: multipart/alternative; boundary=001a1149413620d4170511dd206d --001a1149413620d4170511dd206d Content-Type: text/plain; charset=UTF-8 Hi Phil, On Sat, Mar 21, 2015 at 10:39 AM, Phil Thompson 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@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 :) Andreas --001a1149413620d4170511dd206d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Phil,

On Sat, Mar 21, 2015 at 10:39 AM, Phil Thompson <phi= l@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@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 cour= se.


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 place= d 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<= br> 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.
=C2=A0
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=C2=A0/Library/Pyth= on/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 = :)

Andreas
--001a1149413620d4170511dd206d-- --===============3665486427223949757== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KUHlRdCBtYWls aW5nIGxpc3QgICAgUHlRdEByaXZlcmJhbmtjb21wdXRpbmcuY29tCmh0dHA6Ly93d3cucml2ZXJi YW5rY29tcHV0aW5nLmNvbS9tYWlsbWFuL2xpc3RpbmZvL3B5cXQ= --===============3665486427223949757==--