How can I get the Macport Python version to work with XCode? Which Python.framework do I have to choose?
-
1Hi, you might want to take a look at the following stackoverflow thread: stackoverflow.com/questions/2226902/…ChristopheD– ChristopheD2010-03-08 21:20:00 +00:00Commented Mar 8, 2010 at 21:20
-
@ChristopheD: I saw that question and answer, but it seems to be the opposite problem. He wants to use the Apple python and gets the macports python. In my case PyObj always uses Python 2.6.1 (which is Apple's) and my macports python 2.6.4 is ignored, independently what paths I am setting. What is the secret to tell XCode the Python version I want????Sney– Sney2010-03-08 23:10:34 +00:00Commented Mar 8, 2010 at 23:10
-
No he wannts to use Macports but it seems it picks up Apple's python - try the import sys sys.stderr.write(sys.executable)mmmmmm– mmmmmm2010-03-08 23:31:49 +00:00Commented Mar 8, 2010 at 23:31
1 Answer
Perhaps take a look here: < https://superuser.com/questions/35256/how-can-i-change-the-default-python-version-on-snow-leopard >. The final solution mentions using python_select. Assuming you install different versions of Python in a standard way, this will let you switch between them and then Xcode should respect the new default. If you're using ActivePython, it will be different... but in the case of ActivePython, if you export the PYTHONPATH where your ActivePython executable is located, Xcode should respect that as the default (at least is automatically did on my machine, running OS X 10.5 and ActivePython 2.7).