Reputation: 52233
I'm on OSX Lion and I have libxml2 installed (by default) and I have python installed (by default) but they don't talk to one another. What's the simplest way to make this work on Lion?
$ python -c "import libxml2"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named libxml2
Upvotes: 6
Views: 13725
Reputation: 1027
tkone's answer is OK. But brew also can do it.
Try this,
$ brew install libxml2 --with-python
Upvotes: 7
Reputation: 22728
sudo python setup.py install
ls /Library/Python/2.7/site-packages/
and you should see a bunch of libxml2 filesYou'll need XCode installed, but like, you should already have that installed, right?
Upvotes: 14
Reputation: 23
Just use Pypi to install python module packages, by typing :
sudo pip search libxml and sudo pip install libxml
Upvotes: -4