無法在 Mac OS X 10.9 上安裝 Lxml - Cannot install Lxml on Mac OS X 10.9

問題:

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章