Installing Scrapy in Yosemite

If you get this error while installing Scrapy in Yosemite:

#include "libxml/xmlversion.h"
1 error generated.
error: command 'clang' failed with exit status 1

well even tho I do have Xcode install and my mac had developer mode on, still you need you to install command line tools.

Go to Applications->Utilities->Terminal or use spotlight cmd+spacebar type “Terminal” and open it. once open type:

xcode-select --install

Terminall Install command tools

If the error persist. we can run the following command
STATIC_DEPS=true pip install lxml

but this may fail, so you will need to use the power:
sudo STATIC_DEPS=true pip install lxml

last and not least, remember to install if you haven’t already:

pip install zope.interface==3.6.0

After this all should work now, and you can start creating great applications with scrapy

Success Scrapy


Leave a Reply

Your email address will not be published.