After so much of hassle i build the libxml from source. I performed following steps
- Downloaded the lxml.tar.gz and extracted its contents
- Build it using
python2.7 setup.py build_ext -i -I /usr/include/libxml2 --with-xslt-config=/opt/xslt/bin/xslt-config
-
I tried going in python shell and tried
import lxml. it didn’t worked -
Then i went into directory
/home/user/tmp/(extracted lxml directory/
and on linux command prompt i typed
PYTHONPATH=src python27
then i tried import lxml and then it worked.
src folder conatains folder name lxml
So i want to know that when i build the lxml does it mean that i always need that directory to use it or i can delete that. If not then in which location do i need to put that folder so that if i run python normal way then i can access that
- Does the modules which we build ourselves are not installed in python folder??
- Can i make python egg from it
You told it to
build_ext, so it just compiled it and didn’t install. If you told it toinstall, it would install it in system-wide directory (but you need write permissions for that) or whatever directory you specify (with--home(for installing as user) or--prefix(for installing as root to non-standard directory like under/opt) option).