【发布时间】:2014-01-05 05:37:26
【问题描述】:
每次我尝试安装 lxml 包时,最后都会出现以下错误..
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-
aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/usr/include/libxml2 -I/private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip_build_sanjeevkumar/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.7-intel-2.7/src/lxml/lxml.etree.o -flat_namespace
unable to execute llvm-gcc-4.2: No such file or directory
error: command 'llvm-gcc-4.2' failed with exit status 1
【问题讨论】:
-
这可以说是 lxml 构建脚本中的一个错误。假设/依赖
llvm-gcc-4.2在 OS X 上一段时间不是一个好主意。 -
好吧,这听起来不太好,我从 github 克隆了 howdoi 包,它似乎依赖于 lxml,我收到错误
ImportError: No module named lxml -
对于它的价值
pip install lxml似乎对我有用,尽管有警告。之后import lxml也是如此。你究竟是如何安装 lxml 的,它是当前版本吗?为什么还要手动安装依赖项而不是只使用pip install howdoi或easy_install howdoi? -
另外,
brew install https://raw.github.com/gleitz/howdoi/master/howdoi.rb也应该可以工作,尽管它会将所有这些库添加到我不喜欢的当前 Python 安装中。 -
我没有安装
brew!!
标签: lxml llvm-gcc installation-package