facile à installer lxml sur Python 2.7 sur Windows
j'utilise python 2.7 sur Windows. Comment se fait-il que l'erreur suivante se produise lorsque j'essaie d'installer [lxml][1] en utilisant [setuptools][2]'s easy_install?
C:>easy_install lxml
Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.3.3
Downloading http://lxml.de/files/lxml-2.3.3.tgz
Processing lxml-2.3.3.tgz
Running lxml-2.3.3setup.py -q bdist_egg --dist-dir c:usersmy_userappdatalocaltempeasy_install-mtrdj2lxml-2.3.3egg-dist-tmp-tq8rx4
Building lxml version 2.3.3.
Building without Cython.
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
warning: no files found matching 'lxml.etree.c' under directory 'srclxml'
warning: no files found matching 'lxml.objectify.c' under directory 'srclxml'
warning: no files found matching 'lxml.etree.h' under directory 'srclxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'srclxml'
warning: no files found matching 'etree_defs.h' under directory 'srclxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
warning: no files found matching 'Makefile' under directory 'doc'
error: Setup script exited with error: Unable to find vcvarsall.bat
télécharger le paquet et lancer setup.py install
n'aide pas non plus:
D:My DocumentsInstallsDevPythonlxmllxml-2.3.3>setup.py install
Building lxml version 2.3.3.
Building without Cython.
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
running egg_info
writing srclxml.egg-infoPKG-INFO
writing top-level names to srclxml.egg-infotop_level.txt
writing dependency_links to srclxml.egg-infodependency_links.txt
reading manifest file 'srclxml.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'lxml.etree.c' under directory 'srclxml'
warning: no files found matching 'lxml.objectify.c' under directory 'srclxml'
warning: no files found matching 'lxml.etree.h' under directory 'srclxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'srclxml'
warning: no files found matching 'etree_defs.h' under directory 'srclxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
warning: no files found matching 'Makefile' under directory 'doc'
writing manifest file 'srclxml.egg-infoSOURCES.txt'
installing library code to buildbdist.win32egg
running install_lib
running build_py
creating build
creating buildlib.win32-2.7
creating buildlib.win32-2.7lxml
copying srclxmlbuilder.py -> buildlib.win32-2.7lxml
copying srclxmlcssselect.py -> buildlib.win32-2.7lxml
copying srclxmldoctestcompare.py -> buildlib.win32-2.7lxml
copying srclxmlElementInclude.py -> buildlib.win32-2.7lxml
copying srclxmlpyclasslookup.py -> buildlib.win32-2.7lxml
copying srclxmlsax.py -> buildlib.win32-2.7lxml
copying srclxmlusedoctest.py -> buildlib.win32-2.7lxml
copying srclxml_elementpath.py -> buildlib.win32-2.7lxml
copying srclxml__init__.py -> buildlib.win32-2.7lxml
creating buildlib.win32-2.7lxmlhtml
copying srclxmlhtmlbuilder.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtmlclean.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtmldefs.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtmldiff.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtmlElementSoup.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtmlformfill.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtmlhtml5parser.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtmlsoupparser.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtmlusedoctest.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtml_dictmixin.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtml_diffcommand.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtml_html5builder.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtml_setmixin.py -> buildlib.win32-2.7lxmlhtml
copying srclxmlhtml__init__.py -> buildlib.win32-2.7lxmlhtml
creating buildlib.win32-2.7lxmlisoschematron
copying srclxmlisoschematron__init__.py -> buildlib.win32-2.7lxmlisoschematron
copying srclxmletreepublic.pxd -> buildlib.win32-2.7lxml
copying srclxmltree.pxd -> buildlib.win32-2.7lxml
copying srclxmletree_defs.h -> buildlib.win32-2.7lxml
creating buildlib.win32-2.7lxmlisoschematronresources
creating buildlib.win32-2.7lxmlisoschematronresourcesrng
copying srclxmlisoschematronresourcesrngiso-schematron.rng -> buildlib.win32-2.7lxmlisoschematronresourcesrng
creating buildlib.win32-2.7lxmlisoschematronresourcesxsl
copying srclxmlisoschematronresourcesxslRNG2Schtrn.xsl -> buildlib.win32-2.7lxmlisoschematronresourcesxsl
copying srclxmlisoschematronresourcesxslXSD2Schtrn.xsl -> buildlib.win32-2.7lxmlisoschematronresourcesxsl
creating buildlib.win32-2.7lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_abstract_expand.xsl -> buildlib.win32-2.7lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_dsdl_include.xsl -> buildlib.win32-2.7lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_schematron_message.xsl -> buildlib.win32-2.7lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_schematron_skeleton_for_xslt1.xsl -> buildlib.win32-2.7lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_svrl_for_xslt1.xsl -> buildlib.win32-2.7lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1readme.txt -> buildlib.win32-2.7lxmlisoschematronresourcesxsliso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat
[1]: http://lxml.de/
[2]: http://pypi.python.org/pypi/setuptools
5 réponses
lxml >= 3.x.x
- télécharger un des paquets de L'installateur MS Windows
-
easy_install "c:/lxml_installer.exe"
(crédit kobejohn)
MS Windows Installer téléchargements disponibles pour lxml 3.3.5
un liste de tous les binaires/oeuf lxml package de téléchargement .
lxml 2.3.x
il n'y a pas d'oeuf binaire windows pour lxml 2.3.3 (2.3.0 est le dernier de 2.x.x).
sans donner de numéro de version, easy_install va télécharger les dernières sources,
mais vous n'avez pas installé libxml2 et libxslt.
vous pouvez installer les libs manquants ou vous pouvez essayer le 2.3 comme il ya des binaires œufs pour fenêtres:
easy_install lxml==2.3
vous pouvez télécharger les binaires non officiels de Windows à: http://www.lfd.uci.edu / ~gohlke/pythonlibs/
p.ex. pour python 2.7 32bit: http://www.lfd.uci.edu / ~gohlke/pythonlibs / #lxml
c'est la manière la plus facile dans win32.
j'ai rencontré le même problème. Je ne sais pas pour le vcvarsall.mais si vous voulez juste installer lxml vous pouvez utiliser les installateurs graphiques ici:
https://pypi.python.org/pypi/lxml/3.2.3
ça a marché pour moi.
la solution idéale (qui fonctionne aussi dans des environnements virtuels) a été fournie ici .
fondamentalement, il s'agit de télécharger un fichier de roue de raccord à partir de ici (le" cp "dans le nom de fichier représente votre version Python) et puis tout simplement pip install
ing il.
cela fonctionne sur mon installation (virtualenv) de Python3.3 sur Windows 7 64-bit.
vous pouvez également utiliser anaconda. Une fois que vous l'avez installé ( http://continuum.io/downloads ) vous pouvez simplement exécuter conda install lxml
pour installer lxml.