easy_install lxml on Python 2.7 on Windows

后端 未结 5 1767
感情败类
感情败类 2020-12-13 04:45

I\'m using python 2.7 on Windows. How come the following error occurs when I try to install [lxml][1] using [setuptools][2]\'s easy_install?

C:\\>easy_ins         


        
相关标签:
5条回答
  • 2020-12-13 05:06

    you can download Unofficial Windows Binaries at: http://www.lfd.uci.edu/~gohlke/pythonlibs/

    e.g. for python 2.7 32bit: http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

    It is the easiest way in win32.

    0 讨论(0)
  • 2020-12-13 05:06

    I ran into the same problem. I don't know about the vcvarsall.bat issue but if you just want to install lxml you can use the graphical installers here:

    https://pypi.python.org/pypi/lxml/3.2.3

    That worked for me.

    0 讨论(0)
  • 2020-12-13 05:19

    lxml >= 3.x.x

    1. download one of the MS Windows Installer packages
    2. easy_install "c:/lxml_installer.exe" (credit kobejohn)

    MS Windows Installer downloads available for lxml 3.3.5

    a list of all binary/egg lxml package downloads.


    lxml 2.3.x

    there is no windows binary egg for lxml 2.3.3 (2.3.0 is the latest from 2.x.x).
    without giving a version number easy_install will download the latest sources,
    but you dont have the libxml2 and libxslt installed.

    you could install the missing libs or you could try the 2.3 as there are binary eggs for windows:
    easy_install lxml==2.3

    0 讨论(0)
  • 2020-12-13 05:19

    You can also use anaconda. Once you have it installed (http://continuum.io/downloads) you can just run conda install lxml to install lxml.

    0 讨论(0)
  • 2020-12-13 05:24

    The ideal solution (which also works within virtual environments) has been provided here.

    Basically, it comes down to downloading a fitting wheel file from here (the "cp" in the filename stands for your Python version) and then simply pip installing it.

    It works on my (virtualenv) installation of Python3.3 on Windows 7 64-bit.

    0 讨论(0)
提交回复
热议问题