To install lxml (and easy_install) for Python 3 under Windows...

N

ncdave4life

I had difficulty installing lxml for Python 3.1 under Windows, and
took some notes as I worked through it. Here's how I finally managed
it...


Go to http://lxml.de/installation.html#ms-windows. Follow the link to
the "binary egg distribution of lxml" here:

http://cheeseshop.python.org/pypi/lxml

Download the lxml-2.3-py3.1-win32.egg file.

The instructions say, "Just use easy_install by following the
installation instructions above." Ha! Those instructions don't work
for Python 3 under Windows. The (wrong) instructions are:

Get the easy_install tool [from link http://peak.telecommunity.com/DevCenter/EasyInstall
]
and run the following as super-user (or administrator):
easy_install lxml
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_install lxml==2.2.2

However, that peak.telecommunity.com link goes to an old page that
doesn't support Python 3.

Instead, first we must install Distribute, which is a fork of
Setuptools, to get easy_install. Download distribute_setup.py from
here:

http://pypi.python.org/pypi/distribute#distribute-setup-py

Then run distribute_setup.py

Now you should have an easy_install.exe file here:

C:\python31\Scripts\easy_install.exe

You can run it from a Windows Command Prompt to install lxml-2.3-py3.1-
win32.egg, like this:

C:\python31\Scripts\easy_install.exe lxml-2.3-py3.1-win32.egg


Dave Burton
http://www.burtonsys.com/email/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,965
Messages
2,570,148
Members
46,710
Latest member
FredricRen

Latest Threads

Top