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

查看:97
本文介绍了无法在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 its updated to Xcode 5 it doesnt 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天全站免登陆