views:

240

answers:

2

I'm trying to install libxml2 on my Mac (OS 10.6.4). I'm actually trying to just run a Scrapy script in Python, which has required me to install Twisted, Zope, and now libxml2. I've downloaded the latest version (2.7.7, from xmlsoft.org) and tried following these instructions here. To summarize, I tried this command (in the python subdirectory):

python setup.py --static-deps --libxml2-version=2.7.7 -- libxslt-version=1.1.24

I end up with this error:

failed to find headers for libxml2: update includes_dir

Any ideas?

I also tried running this command:

./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.6/

And I get the following error:

configure: error: no acceptable C compiler found in $PATH

Does that shed any light on the situation?

+1  A: 

Shouldn't you write --libxml2-version=2.7.7 instead?

karlphillip
Yes, thanks for the heads up. I actually did use the correct version in the command. On this page I had just pasted the directions from the linked page.
tchaymore
Careful, there's also a space between -- and libxslt-version=1.1.24
karlphillip
Fixed that too and still no luck.
tchaymore
A: 

I figured out how to get libxml2 installed. It took two steps. First, I didn't have XCode installed, so I had to get that downloaded and installed from Apple Developer Tools. I thought that it had come standard on OX 10.6.4, but I guess not.

Then, in the libxml2 folder I ran these three commands:

./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.3/
make
sudo make install

After that, I switched to the Python subdirectory of the libxml2 folder, and ran a generic setup:

python setup.py install

After that, everything was ready to go.

tchaymore