LoginSignup
0
0

More than 5 years have passed since last update.

Method to build Python environment in Xcode 6

Posted at

Python 2



  1. Open your Xcode, Choose 'Create a new Xcode project'.
  2. Choose 'Other'option under OS X, then choose 'External Build System'. click Next.
  3. Enter your product name. eg. MyPython.
  4. important!! Be careful to fill the blank named 'Build Tool'. We should to fill our Python tool directory. Python2 is '/usr/bin/python'.then, click Next.
  5. Choose the directory to save your project.Click Create.
  6. Choose 'Product' -> 'Scheme' -> 'Edit Scheme' on Xcode Tool Bar.
  7. In the Edit view, choose 'Run' on the left option list.choose 'Info' option on the right,then, Choose 'Executable' -> 'other'.then press key 'command + shift + G', input '/usr/bin/python', click 'Go'.finally choose 'python', click 'Choose'.
  8. The same in 'Info', unselect the 'Debug executable' option.
  9. Next, choose the 'Arguments' option, under 'Arguments Passed On Launch', click '+', input your python file name. eg "kqx.py".
  10. Next, choose the 'Options', select 'Working Directory', choose your Xcode project dirctory.
  11. OK, it is all. Then close the 'Edit Scheme' View.
  12. Then, we can create a python project.'Command + N' to choose 'OS X'->'Empty'->Next.Input your python file name. eg "kqx.py". click 'Create'.
  13. Your can code your python code.~(≧▽≦)/~
  14. Uploading 5B1D0E02-B228-4F6F-89F4-DE8C0AEA2095.png
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0