1

When I try to build up a python project in Xcode, I followed the instruction online which said if I wanna build that I need to do following.

  1. File - New - Project - External Build System.
  2. File - New - File - Empty.
  3. Product - Scheme - Edit Scheme
  4. Info - Executable - Other - Python installed directory (/usr/bin/python ,default) Debugger(None)
  5. Arguments - Arguments Passed On Launch = python file.
  6. Options - Working Directory(python file directory).

then I run the project An error came out:

Command /usr/bin/make failed with exit code 2;

What should I do to fix this?

RomanHotsiy
  • 4,978
  • 1
  • 25
  • 36

3 Answers3

2

From Exit Codes With Special Meaning

2.  Misuse of shell builtins (according to Bash documentation)
    Missing keyword or command, or permission problem (and diff return code on a failed binary file comparison).

It looks like you have a permission issue (sudo) or you're not passing the correct parameters to the python executable.

blakev
  • 4,154
  • 2
  • 32
  • 52
0

I have just faced the same issue but with a different scenario, I will post my solution here and I hope it helps somebody else:

I'm working in an old App that was built using XCode 6, it builds completely fine no issues. This App have a networking library and it compiles fine in XCode 6 as well.

However, in XCode 7 the network library does not compile and gives the error:

make: *** No rule to make target `install'.  Stop.
Command /usr/bin/make failed with exit code 2

So, after some digging I did edit the Makefile (myApp/Makefile) and added the following entry:

install:: version

So, the error is about the install rule missing, I don't use this in XCode 6 but after adding it the error is gone. Now I can create my archives without issue in XCode 7 =D

Wils
  • 1,211
  • 17
  • 31
0

unfortunately, I met the same issue but my error code is

make: *** no targets specified and no makefile found . stop.

enter image description here

finally I solved it, the following is my method

the build tool patch was default configured before as

/usr/bin/make

if you wanna run *.py file, you should change the directory as

/usr/bin/python

build successful enter image description here

J.Error
  • 1
  • 1