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

Discussion in 'Python' started by ncdave4life@mailinator.com, Jun 12, 2011.

  1. Guest

    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/
     
    , Jun 12, 2011
    #1
    1. Advertising

  2. On 12-6-2011 18:38, wrote:
    > 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...
    >
    >

    [...]

    In cases like this, Christoph Gohlke's page with 'Unofficial Windows Binaries for Python
    Extension Packages' can be very handy:

    http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml


    -irmen
     
    Irmen de Jong, Jun 12, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sebastian Bassi
    Replies:
    0
    Views:
    504
    Sebastian Bassi
    Feb 22, 2009
  2. Garrett Cooper
    Replies:
    0
    Views:
    660
    Garrett Cooper
    Feb 22, 2009
  3. Guillermo
    Replies:
    1
    Views:
    340
    Michel Claveau - MVP
    Oct 26, 2009
  4. smith jack
    Replies:
    1
    Views:
    458
    aspineux
    Aug 16, 2011
  5. Irmen de Jong

    Re: Install lxml package on Windows 7

    Irmen de Jong, May 30, 2012, in forum: Python
    Replies:
    0
    Views:
    661
    Irmen de Jong
    May 30, 2012
Loading...

Share This Page