Skip to content

Instantly share code, notes, and snippets.

@ambienttraffic
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ambienttraffic/da861bcb24e9f9a8db69 to your computer and use it in GitHub Desktop.
Save ambienttraffic/da861bcb24e9f9a8db69 to your computer and use it in GitHub Desktop.
how to install lxml on your local machine
I had a lot of trouble installing lxml - the following steps might help you.
First, install the latest version of XCode. You'll need to do it through the App Store.
https://developer.apple.com/xcode/
Once it's installed, open XCode and accept the terms of use.
Go to Preferences > Downloads.
Under "Components", install "Command Line Tools".
Quit XCode.
Go to the command line. Try:
pip install lxml
If you get clang errors, try the following commands:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
And then
pip install lxml
If that still doesn't work, and you have the Apple-installed version of Python installed, try this:
sudo -E pip install lxml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment