The code
from lxml import etree
produces the error
ImportError: No module named lxml
Running
sudo easy_install lxml
results in
lxml 2.2.7 is already the active version in easy-install.pth
Removing lxml-2.2.7-py2.5-macosx-10.3-i386.egg from site-packages and rerunning sudo easy_install lxml results in
Adding lxml 2.2.7 to easy-install.pth file
Installed /Library/Python/2.5/site-packages/lxml-2.2.7-py2.5-macosx-10.3-i386.egg
Processing dependencies for lxml
Finished processing dependencies for lxml
And yet I still get No module named lxml
What step am I missing in order to use lxml on my Mac (OSX 10.5)?
Update
python --version reports
Python 2.5.2
and running python produces
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin