Why does the pip installer expect gcc-4.2 to be the name of the gcc compiler in OS X Lion?

When installing packages in Python using pip, I found the following error:

unable to execute gcc-4.2: No such file or directory

Clearly, pip is trying to use gcc-4.2, which is not in any of the binary directories, namely / usr / bin. After looking at this site and others, I found that many others are suffering from the same problem. However, gcc is upgraded to version 4.2 on OS X Lion, and this is not a version issue; rather, gcc is called gcc, not gcc-4.2, under / usr / bin and is symbolically attached to llvm-gcc. After adding gcc-4.2 to / usr / bin as a symbolic link to gcc, pip was able to successfully install everything. Why then does the pip look for gcc-4.2 and not gcc? Is this a pip, OS X Lion, or package inside pip error trying to install itself using gcc-4.2?

Finally, is this my link to the link you need to make in this situation, or should I have fixed it in some other way?

+5
source share
2 answers

Your simlink hack is the right solution. Ultimately, people who support pip for the platform should stop using explicit versions of the compiler this way. It was a bad idea to start with and it will only get worse as the compilers on the platform are changing.

Contrary to Milad's request, there are other solutions for determining the version in the host compiler, and your solution will work until people who support pip on the platform fix their code.

+6
source

- - . pip , GCC. , gcc , . , , gcc-4.1, , .

0

All Articles