lxml安装失败

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: 
#c33720}span.s1 {font-variant-ligatures: no-common-ligatures}

Command "/usr/bin/python -u -c "import setuptools, 
tokenize;__file__='/private/tmp/pip-build-
I4r7zO/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)
(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-
PlHHli-record/install-record

解决方法:

  1. 安装brew。

  2. 安装lxml:brew install libxml2brew install libxsltbrew link libxml2 --forcebrew link libxslt --force

  3. sudo pip install lxml

  4. sudo pip install scrapy

你可能感兴趣的:(lxml安装失败)