I want to install Lxml so I can then install Scrapy.
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
I have tried using brew to install libxml2 and libxslt, both installed fine but I still cannot install lxml.
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?
I solved this issue on
Yosemite
by running the following commands:OSX 10.9.2
You should install or upgrade the commandline tool for xcode. Try this in a terminal:
You may solve your problem by running this on the commandline:
It sure helped me. Explanations on docs
I tried all the answers on this page, none of them worked for me. I'm running OS X Version 10.9.2
But this definitely works....like a charm:
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install lxml
Try:
Or:
It works!