installing lxml ?

srid sridhar.ratna at gmail.com
Wed Nov 11 14:38:23 EST 2009


Much of these non-trivial build steps are abstracted in the
ActiveState build repository.

1. Download ActivePython: http://www.activestate.com/activepython/
2. Run "pypm install lxml" (on Mac, Linux or Windows)

$ pypm install lxml
Ready to perform these actions:
The following packages will be installed:
 lxml-2.2.2
Get: [pypm.activestate.com] lxml 2.2.2-2
Installing lxml-2.2.2
$ python -c "import lxml; print lxml.__file__"
/Users/sridharr/.local/lib/python2.6/site-packages/lxml/__init__.py
$

-srid


On Nov 11, 4:49 am, 7stud <bbxx789_0... at yahoo.com> wrote:
> I'm trying to installlxml, but I can't figure out the installation
> instructions.  Here:
>
> http://codespeak.net/lxml/installation.html
>
> it says:
>
> 1) Get the easy_install tool.
>
> Ok, I went to the easy_install website, downloaded, and installed it.
> The last two lines of the output during installation said this:
>
> Installingeasy_install script to /Library/Frameworks/Python.framework/
> Versions/2.6/binInstallingeasy_install-2.6 script to /Library/Frameworks/
> Python.framework/Versions/2.6/bin
>
> 2) ...run the following as super-user (or administrator):
>
> easy_installlxml
>
> On MS Windows, the above will install the binary builds that we
> provide. If there is no binary build of the latest release yet, please
> search PyPI for the last release that has them and pass that version
> to easy_install like this:
> easy_installlxml==2.2.2
>
> On Linux (and most other well-behaved operating systems), easy_install
> will manage to build the source distribution as long as libxml2 and
> libxslt are properly installed, including development packages, i.e.
> header files, etc. Use your package management tool to look for
> packages like libxml2-dev or libxslt-devel if the build fails, and
> make sure they are installed.
>
> On MacOS-X, use the following to build the source distribution, and
> make sure you have a working Internet connection, as this will
> download libxml2 and libxslt in order to build them:
> STATIC_DEPS=true easy_installlxml
>
> -----------
>
> My os is mac os x 10.4.11.   But this:
>
> STATIC_DEPS=true easy_installlxml
>
> is not a valid command:
>
> $ sudo STATIC_DEPS=true easy_installlxml
> Password:
> sudo: STATIC_DEPS=true: command not found
>
> In any case, if I do this:
>
> $ sudo easy_installlxml
> sudo: easy_install: command not found
>
> In other words, when I installed easy_install it did not add anything
> to my PATH which points to the installation directory mentioned during
> installation:
>
> Installingeasy_install script to /Library/Frameworks/Python.framework/
> Versions/2.6/bin
>
> Ok, so I need to use the full path to the easy_install program (which
> is not mentioned ANYWHERE in the installation instructions), i.e.
>
> /Library/Frameworks/Python.framework/Versions/2.6/bin/easy_install
>
> ...but this still isn't going to work:
>
> $ sudo STATIC_DEPS=true /Library/Frameworks/Python.framework/Versions/
> 2.6/bin/easy_installlxml
> Password:
> sudo: STATIC_DEPS=true: command not found
>
> So what the heck is going on??
>
> Attention developers: you may be one of the best programmers in the
> world, but if you can't convey how to use your software to the average
> user, then you are the equivalent of one of the worst programmers on
> the planet.




More information about the Python-list mailing list