Install lxml package on Windows 7

David Fanning news at idlcoyote.com
Tue May 29 16:54:11 EDT 2012


David Fanning writes: 

> 
> Folks,
> 
> I need some help. I need the lxml package to run a particular
> Python program. 
> 
>    http://lxml.de/
> 
> I downloaded the appropriate binary egg package for lxml, and
> I found easy_install.exe in my Python 2.7 distribution. I ran
> that.
> 
> Then, at the command prompt I typed this:
> 
>    easy_install --allow-hosts=lxml.de,*.python.org lxml==2.3.4
> 
> The usual installation pop-ups appear. "Do I want to allow
> such and so to install, etc.". Yes, yes. Finally, I get
> a message, "Installation may not have been done correctly."
> I have several choices, including "Install with recommended
> parameters", which I choose. The installation proceeds without
> any other indication of failure.
> 
> I presume I have the package installed now. So, I enter
> Python and type this:
> 
>    >>>import lxml
> 
> I get an error. No module with that name found, etc.
> 
> Sure enough, I look in C:\Python27\site_packages and there
> is no lxml-2.3.4 folder.
> 
> Any idea what I might be doing wrong?

If I try to install from the lxml binary package I downloaded 
and upzipped I get this:

c:\Python27>python lxml-2.3.4/setup.py install
Building lxml version 2.3.4.
WARNING: Trying to build without Cython, but pre-generated 
'src/lxml/lxml.etree.
c' does not seem to be available.
ERROR: 'xslt-config' is not recognized as an internal or external 
command,
operable program or batch file.

** make sure the development packages of libxml2 and libxslt are 
installed **

Using build configuration of libxslt
running install
running bdist_egg
error: error in 'egg_base' option: 'src' does not exist or is not a 
directory


Confused. :-)

Cheers,

David
-- 
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")



More information about the Python-list mailing list