I want to set up a python 3 project in Xcode, but I fail in the step where I'm asked to choose an executable for the scheme. See step 16 in the answer to Python in Xcode 4+?.
I use "which python3" to locate the executable:
$ which python3
/usr/local/bin/python3
but Xcode does not let me choose python3 from "/usr/local/bin" by clicking on it:
If I try following the suggestion of trojanfoe below to uncover the symbolic link through: ls -l /usr/local/bin/python3 I get to "../Cellar/python3/3.5.1/bin/python3" which in turn is a symbolic link pointing to "../Frameworks/Python.framework/Versions/3.5/bin/python3" which finally points at "Python3.5" in that directory. However, my Xcode also is not willing to let me select this file:
I'm running Xcode 7.3.1 in OS X 10.11.4. I've installed python 3.5.1 with home-brew.
In the file selection window right-click on python3.5 and select quick look. Close the quick look window and python3.5 will become selectable. (images attached show workflow referencing the newer python3.6 - it is the same for all python releases).
Right click on python executable
Pop up window will be shown
Select quicklook
Python executable has been selectable and "choose" button is clickable
I just finished wrestling with this for about three hours.
Okay, short answer (which marken, above, deserves credit for): Just right-click the dimmed out python3 executable, then click "Quick Look", then hit the space bar to exit the quick-look, and notice the executable is now selected, and just hit enter, or click "Choose".
I have the following explanation to offer. The reason for our ability to see--but not to select--the python3 executable is that Homebrew uses a file alias, /usr/local/bin/python3, which brew's installation is given restricted permissions that Xcode is unable to pre-select, for reasons I am unsure of. (You might notice you can tediously select the executable at each and every runtime.) The alias points, in my case, to the Homebrew "Cellar"; for your reference, using the Terminal app to execute,ls -al /usr/local/bin/python3
reveals that my it's aliased to the true Homebrew python3 executable located at /usr/local/Cellar/python3/3.5.2_3/bin/(python3)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With