Can't pip install anything requiring C compilation on OSX 10.10 with homebrew python

耗尽温柔 提交于 2019-12-10 14:48:51

问题


When I try to pip install things that involve C compilation (Pillow, specifically) I get an odd error:

clang: error: no such file or directory: 'Python.framework/Versions/2.7/Python'

error: command 'clang' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/xt/f2d8vp4j65j2rt71pns6trjw0000gn/T/pip_build_jakob/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xt/f2d8vp4j65j2rt71pns6trjw0000gn/T/pip-LnL0hW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/xt/f2d8vp4j65j2rt71pns6trjw0000gn/T/pip_build_jakob/Pillow

I posted my pip.log for this installation.

I think this problem is due to a combination of OSX 10.10 Yosemite and Homebrew python. Have you experienced this before? ideas on how to fix it?


回答1:


You need to install XCode in order to be be able to compile on OS X.



来源:https://stackoverflow.com/questions/26365470/cant-pip-install-anything-requiring-c-compilation-on-osx-10-10-with-homebrew-py

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!