python - 无法在 Mac OS X 10.9 上安装 Lxml

标签 python xcode macos scrapy lxml

我想安装 Lxml,这样我就可以安装 Scrapy。

当我今天更新我的 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

我试过用brew安装libxml2和libxslt,都安装好了,但还是不能安装lxml。

上次安装时,我需要在 Xcode 上启用开发人员工具,但由于它已更新到 Xcode 5,它不再为我提供该选项。

有人知道我需要做什么吗?

最佳答案

您应该为 Xcode 安装或升级命令行工具。 在终端中试试这个:

xcode-select --install

关于python - 无法在 Mac OS X 10.9 上安装 Lxml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19548011/

相关文章:

python - 在 centOS 7 中安装 pip

python - 无法解析 netParameter 文件

swift - 删除 UINavigationBar 后退按钮额外的填充?

cocoa - 在 Objective-C 中转换 FLV 文件

macos - 如何从 NSPopUpButton 获取所选项目?

python - importlib._bootstrap 和 python 解释器初始化

ios - 如何更改 UITableView 和 Pixate 中的单元格高度

c++ - 如何找出我的内存去了哪里

linux - Bash 文件在用于 testng 的 Windows 中运行良好,但在 linux/mac 中不起作用

python - 'yield' 关键字的文档字符串标记