pip install fails for OSX machine with no compiler #1074

matthew-brett opened this Issue Jun 6, 2014 · 4 comments

2 participants


On an OSX 10.6 machine with no compiler installed:

$ python setup.py build                                                                              
running build
running build_py
running build_ext
Traceback (most recent call last):
  File "setup.py", line 183, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
  File "setup.py", line 85, in run
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 307, in run
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 170, in customize_compiler
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.py", line 418, in customize_compiler
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.py", line 191, in _find_appropriate_compiler
    "Cannot locate working compiler")
SystemError: Cannot locate working compiler

This seems to be because the customize_compiler step is now failing, rather than the build_extension step, and the check / fallback routine overrides build_ext.build_extension. Thus the build_ext.run command fails before it gets to the check / fallback routine.

tornadoweb member

Which version of Tornado is this? This was supposed to be fixed in 3.2.1.


Current master. When I submitted that fix, it worked, but checking out 3.2.1 now gives the same error. I wonder whether something changed in distutils?

tornadoweb member

Hmm, maybe the exception is coming from a different place now? Perhaps the except clause at https://github.com/tornadoweb/tornado/blob/master/setup.py#L86 needs to catch build_errors instead.


For example - works OK on older Python 2.7.3 I have to hand.

@bdarnell bdarnell added a commit that closed this issue Jun 7, 2014
@bdarnell bdarnell Broaden catch clause in extension building.
This should allow Tornado to be installed again on OSX with no
compiler available.

Closes #1074.
@bdarnell bdarnell closed this in 9fa52d7 Jun 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment