PDA

View Full Version : What happened to PyObjC?


Ryan
2010-04-11, 21:06
I noticed the latest Xcode doesn’t have support for the PyObjC bridge. The templates are gone and I can’t get anything to run. It’s trying to execute which some strange copy of Python I have installed somewhere rather than the one in /usr/bin and it can’t “import objc”. Works fine when I run it from /usr/bin/python, but not the one in (I believe) /usr/local/bin, which also throws the ImportError.

So, how do I either get Xcode to use /usr/bin/python instead of /usr/local/bin/python? Also, what happened to PyObjC? Is it deprecated?

edit: So, turns out /usr/local/bin/python was a symlink to python2.4 in the system-wide framework. I tried changing the link to 2.6, but the problem persists. It’s fine if I run it from /System/Library/Frameworks/Python.framework/Versions/Current/bin/python, but if I try “import objc” from a symlink to that, I get an ImportError. Sounds like my bash PATH maybe has a problem?

edit again: OK, fixed the path, now /usr/local/bin/python runs python2.6 and “import objc” works fine. However, I still get that error in Xcode. What python is Xcode running? Anyone know? Sounds like I just need to point it to the right one.

edit again: I seem to be having the same problem as this guy ("http://bugs.python.org/issue6812”) but they don’t have a solution. :\

Aha! Finally. Deleted some extra Python frameworks that were pointing to 2.4 in /Library and that fixed it.

Well, this was a rather pointless thread, wasn’t it. :p