My system is OS X 10.11 El Capitan with SIP enabled, with Xcode 7.2.1, and the following solution work for me.
The solution briefly: for your executable, select the Python installed in your system, which resides in:
Python.framework/Versions/ (3.x or 2.7) /Python
The location of Python.framework depends on which distribution of Python you're using. Most often it can be found in
More comprehensive directions below.
Edit your Xcode scheme:
- Select Product > Scheme > Edit Scheme
- Run > Info > Executable > Other
- Press Cmd(⌘)+Shift+G and type in the place where your Python executables are installed.
- Select "Python" executable file.
Now, the place where the actual executables varies, depending on which Python distribution you chose to install. None of those, to my knowledge, place anything but symlinks to
/opt/local/bin. Below, I'll provide directions to finding your Python executable file.
This is the version from the official Python website, and it resides in
Installs to the same directory as MacPython.
MacPorts installs its python to
HomeBrew has two possible locations for your Python.framework, because unlike any other distribution, HomeBrew installs them separately.
- python2 in
- python3 in
Inside either of them, you'll find
Python.framework, you'll want to open a folder named
Versions. Inside, you'll find folders corresponding to Python versions installed on your system. Open whichever one you want to use, and inside You'll find an executable named
Python. You're done!