无法在 Mac OS X 10.9 上安装 Lxml [英] Cannot install Lxml on Mac OS X 10.9

查看:45
本文介绍了无法在 Mac OS X 10.9 上安装 Lxml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想安装 Lxml 以便我可以安装 Scrapy.

I want to install Lxml so I can then install Scrapy.

当我今天更新我的 Mac 时,它不会让我重新安装 lxml,我收到以下错误:

When I updated my Mac today it wouldn't let me reinstall lxml, I get the following error:

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.

I have tried using brew to install libxml2 and libxslt, both installed fine but I still cannot install lxml.

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

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.

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

Does anyone know what I need to do?

推荐答案

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

You should install or upgrade the commandline tool for Xcode. Try this in a terminal:

xcode-select --install

这篇关于无法在 Mac OS X 10.9 上安装 Lxml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆