问题:
I want to install Lxml so I can then install Scrapy.我想安装 Lxml,这样我就可以安装 Scrapy。
When I updated my Mac today it wouldn't let me reinstall lxml, I get the following error:当我今天更新我的 Mac 时,它不会让我重新安装 lxml,我收到以下错误:
In file included from src/lxml/lxml.etree.c:314:
/private/tmp/pip_build_root/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
I have tried using brew to install libxml2 and libxslt, both installed fine but I still cannot install lxml.我曾尝试使用 brew 安装 libxml2 和 libxslt,两者都安装得很好,但我仍然无法安装 lxml。
Last time I was installing I needed to enable the developer tools on Xcode but since it's updated to Xcode 5 it doesn't give me that option anymore.上次安装时,我需要在 Xcode 上启用开发人员工具,但由于它已更新到 Xcode 5,因此不再提供该选项。
Does anyone know what I need to do?有谁知道我需要做什么?
解决方案:
参考一: https://en.stackoom.com/question/1K1KV参考二: https://stackoom.com/question/1K1KV