[PyQt] question about installation best practices on OS X
woklist at kyngchaos.com
Tue Oct 20 17:40:03 BST 2009
On Oct 20, 2009, at 11:05 AM, Darren Dale wrote:
>> I found some other issues related to using the system python
>> (/Library/Python/2.6/site-packages appearing late in PYTHONPATH, so
>> system-provided packages like numpy-1.2.1 are favored over manually
>> installed packages like numpy-1.3), so it looks like it is a good
>> to not use the system python.
> I don't want to turn this into a forum to air general mac issues, but
> I have to qualify that last remark. The mac installers distributed by
> python.org do not appear to support a 64 bit environment. So I am back
> to using the system python.
One thing you can do to get custom builds to override system builds
(like numpy) is create a separate site-packages (let's say "/Library/
Python/2.6/site-overrides" for example) for these and add a pth file
to the default site-packages like:
import sys; sys.path.insert(0,'/Library/Python/2.6/site-overrides')
This makes sure that the site-overrides is before the system paths.
Some packages already do something similar (easyinstall-based,
I do something similar for some frameworks I build (GDAL, SQLite) that
also have python modules. I put the python modules inside my
framework and add an insert-pth file to site-packages pointing to my
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
Earth: "Mostly harmless"
- revised entry in the HitchHiker's Guide to the Galaxy
More information about the PyQt