1

I was trying to install lxml on windows. I am running python 3.5. I used the win installer, did not work. It gives me an error saying Python 3.2 not found. I use pip or easy_install it tries to install and then gives me an error saying

C:\Users\>easy_install lxml
Searching for lxml
Reading https://pypi.python.org/simple/lxml/
Best match: lxml 3.5.0
Downloading https://pypi.python.org/packages/source/l/lxml/lxml-3.5.0.tar.gz#md5
=9f0c5f1eb43ff44d5455dab4b4efbe73
Processing lxml-3.5.0.tar.gz
Writing C:\Users\vasisht\AppData\Local\Temp\easy_install-ze62aj3w\lxml-3.5.0\setup.cfg
Running lxml-3.5.0\setup.py -q bdist_egg --dist-dir     
C:\Users\...\AppData\Local\Temp\easy_install-ze62aj3w\lxml-3.5.0\egg-dist-tmp-cwiu9v46
Building lxml version 3.5.0.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
error: Setup script exited with error: Unable to find vcvarsall.bat

I have been scratching my head and scouring google for an answer. Please shed some light for me. Thanks

Monkey D Luffy
  • 94
  • 3
  • 11
  • 1
    Possible duplicate of [How do I point easy\_install to vcvarsall.bat?](http://stackoverflow.com/questions/6551724/how-do-i-point-easy-install-to-vcvarsall-bat) – ᴀʀᴍᴀɴ Feb 19 '16 at 22:08
  • 1
    Check out these docs: http://lxml.de/installation.html#source-builds-on-ms-windows – chishaku Feb 19 '16 at 22:12

2 Answers2

1

try:

The lxml package is developed in a repository on Github using Mercurial and the hg-git plugin. You can retrieve the current developer version using:

hg clone git://github.com/lxml/lxml.git lxml

This will create a directory lxml and download the source into it, including the complete development history. Don't be afraid, the download is fairly quick. You can also browse the lxml repository through the web.

Clone the source repository as described above (or download the source tar-ball and unpack it) and then type:

python setup.py build

(c) http://lxml.de/build.html#building-the-sources

You sitll can install from sources using pip

pip install -e git+git://github.com/lxml/lxml.git#egg=lxml

Have in mind that lxml requires Cython

Mauro Baraldi
  • 6,346
  • 2
  • 32
  • 43
MaxU - stand with Ukraine
  • 205,989
  • 36
  • 386
  • 419
0

First install cpython, (pip install cpython) it is already mentioned in your error code where python is telling you: ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"

then libxml(2) and libxslt from http://www.xmlsoft.org/downloads.html

install lxml (pip install lxml)

just a starter pl try it may work for you and for others

Umair
  • 6,366
  • 15
  • 42
  • 50
DD Sharma
  • 43
  • 2
  • 10