Python with Xcode

Python with Xcode

In this tutorial, I’ll show how to execute and run Python codes with Xcode.

1. Open up Xcode. Applications ▸ Xcode
2. Click on Create a new Xcode project
3. Select Other – External Build System
4. Give a Product Name, such as ‘python’
5. Now open up Terminal. Applications ▸ Utilities ▸ Terminal. And run the command ‘which python’. You’ll get the python directory from there. Copy it
6. Now go back to Xcode, and paste the python directory in Build…

, ,

14 thoughts on “Python with Xcode

  1. It didn't work, and did everything correctly. When I ran the file, Xcode gave me a launch error.
    "Launch Error: There is a problem launching using posix_spawn (error code: 8)."

  2. Hi, how do I add another python file to the project ?
    File > New > runs but prints out’s code. Is there any way to do it, or do I have to create new project for each new .py file I want to add. Thank you.

  3. When I get to 0:50 and enter the key combination shown in this tutorial it does not bring me to a window that asks me to enter the pathway.  Is there another method of entering the pathway?

Leave a Reply

Your email address will not be published. Required fields are marked *