tarmstrong / nbdiff

A diffing and merging tool for the IPython Notebook.
http://nbdiff.org
MIT License
212 stars 28 forks source link

Pip install fails on Mac OSX: missing compiler #224

Open tritemio opened 10 years ago

tritemio commented 10 years ago

Under Mac OSX, with Anaconda 1.9.1, the nbdiff installation using:

pip install nbdiff

fails due to missing compiler.

I don't have a compiler installed, does nbdiff really need a compiler?

Full error:

...
Complete output from command /Users/anto/anaconda/bin/python -c "import setuptools, tokenize;__file__=u'/private/var/folders/f9/0bmk_59d7n31hzrdrrx1n04r0000gp/T/pip_build_anto/python-Levenshtein/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/f9/0bmk_59d7n31hzrdrrx1n04r0000gp/T/pip-9G5Ni7-record/install-record.txt --single-version-externally-managed --compile:

running install

running build

running build_ext

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/f9/0bmk_59d7n31hzrdrrx1n04r0000gp/T/pip_build_anto/python-Levenshtein/setup.py", line 46, in <module>
    """,
  File "/Users/anto/anaconda/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/Users/anto/anaconda/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/Users/anto/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/anto/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/install.py", line 54, in run
  File "/Users/anto/anaconda/lib/python2.7/distutils/command/install.py", line 563, in run
    self.run_command('build')
  File "/Users/anto/anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/Users/anto/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/anto/anaconda/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/Users/anto/anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/Users/anto/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/anto/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/build_ext.py", line 52, in run
  File "/Users/anto/anaconda/lib/python2.7/distutils/command/build_ext.py", line 307, in run
    customize_compiler(self.compiler)
  File "/Users/anto/anaconda/lib/python2.7/distutils/sysconfig.py", line 170, in customize_compiler
    _osx_support.customize_compiler(_config_vars)
  File "/Users/anto/anaconda/lib/python2.7/_osx_support.py", line 418, in customize_compiler
    _find_appropriate_compiler(_config_vars)
  File "/Users/anto/anaconda/lib/python2.7/_osx_support.py", line 191, in _find_appropriate_compiler
    "Cannot locate working compiler")

SystemError: Cannot locate working compiler
tarmstrong commented 10 years ago

This suggests that we should remove the python-Levenshtein dependency (which is written in C), but in the mean time you might try:

easy_install python-Levenshtein

... which should install a pre-compiled version of that package. Then try pip install nbdiff again.

Does that work?

tritemio commented 10 years ago

Sorry for the delay. Even using easy_install I get the same error message:

SystemError: Cannot locate working compiler