After Mac OSX is upgraded to 10.10 (Yosemite), when you install the Python package with Pip and Easy_install, if the package needs to be compiled, the compilation fails with the following error:
Build/temp.macosx-10.10-x86_64-2.7/greenlet.o-o build/lib.macosx-10.10-x86_64-2.7/greenlet.so
Ld:file not Found:python.exe
Clang:error:linker command failed with exit code 1 (use-v to see invocation)
Error:command ' Clang ' failed with exit status 1
Xcode upgrade to 6.1 after Python install compile default clang
It was confusing why Python.exe appeared in OSX, StackOverflow said it was just the default name in OSX, and it didn't make sense to ignore
The answers given in the StackOverflow:
You can add archflags=-wno-error=unused-command-line-argument-hard-error-in-future to ignore this error before Pip install, but this does not solve the problem
The real problem is the problem with Python itself, causing it to not install properly
The problem is: Configure.ac in Python's source code:
Case $ac _sys_system/$ac _sys_release in
...
darwin/*)
# use-undefined Dynamic_lookup whenever possible (10.3 and later).
# This allows a extension to being used in any Python
if test ${macosx_deployment_target} ' > ' 10.2
Then
if test "${enable_universalsdk}"; Then
Ldflags= "${universal_arch_flags}-isysroot ${universalsdk} ${ldflags}"
Fi
Ldshared= ' $ (CC)-bundle-undefined dynamic_lookup '
Ldcxxshared= ' $ (CXX)-bundle-undefined dynamic_lookup '
Bldshared= "$LDSHARED"
Else
Ldshared= ' $ (CC)-bundle '
The problem is with the if test ${macosx_deployment_target} ' > ' 10.2
Version 10.10 < 10.2 The real problem is here.
Solutions
First you need to install the command-line Tool (if you do not install the Execute command xcode-select--install to install)
This is the problem in python2.7.6, the simplest way is to install 2.7.8 or more
Mac OSX 10.10 pip installation Issue