How to install pyobjc on SnowLeopard without installing default python
I am having trouble installing pyobjc on SnowLeopard.
It comes with python 2.6, but I need 2.5, so I installed 2.5 successfully. After that I installed xcode. After that I installed pyobjc with "easy_install-2.5 pyobjc"
But when I run my python 2.5 and from the cmd line I try to import Foundation, it says "no module named Foundation"
I was trying to do
export PYTHONPATH="/Library/Python/2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc"
before starting the interpreter for python, but no luck so far (this directory is the only installation .egg pyobjc in the catalog and in packages of sites, there are several files with eggs ... in objc subdir have the init . Py file)
Of course from 2.6 everything works fine. How do I know what is wrong and what should I do?
When I print sys.modules from python 2.6 I find that the objc that is being imported is basically from the same install location "/Library/Python/2.6/site-packages/pyobjc_core-2.2-py2.6-macosx- 10.6- universal.egg / objc / "so why won't it work for 2.5?
a source to share
Ok, found what's wrong.
My SnowLeopard comes with BOTH python 2.6 (default) and 2.5 installed
Xcode has objc installed for both.
So, basically I broke my pythonpath etc. with additional routine installations of python 2.5 and objc, some libraries were incompatible (mine and original python is 2.5.4, but slightly different versions and more importantly, probably built with different build options)
What I did: Make sure I start over with the original python2.5 (on my system it is in / usr / bin / python 2.5) by removing the wrong entries from easy_install.pth in the site packages and adding the PyObjc path to easy_install.pth.
Sorry I didn't find out earlier, but hope this will be helpful to someone in the future!
a source to share