title: How to install lxml on Windows
body: <p>I'm trying to install <code>lmxl</code> on my Windows 8.1 laptop with Python 3.4 and failing miserably.</p>
  
  <p>First off, I tried the simple and obvious solution: <code>pip install lxml</code>. However, this didn't work. Here's what it said:</p>
  
  <pre><code>Downloading/unpacking lxml
    Running setup.py (path:C:\Users\CARTE_~1\AppData\Local\Temp\pip_build_carte_000\lxml\setup.py) egg_info for package lxml
      Building lxml version 3.4.2.
      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
      C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
        warnings.warn(msg)
  
      warning: no previously-included files found matching '*.py'
  Installing collected packages: lxml
    Running setup.py install for lxml
      Building lxml version 3.4.2.
      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
      building 'lxml.etree' extension
      C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
        warnings.warn(msg)
      error: Unable to find vcvarsall.bat
      Complete output from command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\CARTE_~1\\AppData\\Local\\Temp\\pip_build_carte_000\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\CARTE_~1\AppData\Local\Temp\pip-l8vvrv9g-record\install-record.txt --single-version-externally-managed --compile:
      Building lxml version 3.4.2.
  
  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
  
  running install
  
  running build
  
  running build_py
  
  creating build
  
  creating build\lib.win32-3.4
  
  creating build\lib.win32-3.4\lxml
  
  copying src\lxml\builder.py -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\cssselect.py -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\doctestcompare.py -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\ElementInclude.py -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\pyclasslookup.py -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\sax.py -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\usedoctest.py -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\_elementpath.py -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\__init__.py -&gt; build\lib.win32-3.4\lxml
  
  creating build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\__init__.py -&gt; build\lib.win32-3.4\lxml\includes
  
  creating build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\builder.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\clean.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\defs.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\diff.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\ElementSoup.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\formfill.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\html5parser.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\soupparser.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\usedoctest.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\_diffcommand.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\_html5builder.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\_setmixin.py -&gt; build\lib.win32-3.4\lxml\html
  
  copying src\lxml\html\__init__.py -&gt; build\lib.win32-3.4\lxml\html
  
  creating build\lib.win32-3.4\lxml\isoschematron
  
  copying src\lxml\isoschematron\__init__.py -&gt; build\lib.win32-3.4\lxml\isoschematron
  
  copying src\lxml\lxml.etree.h -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\lxml.etree_api.h -&gt; build\lib.win32-3.4\lxml
  
  copying src\lxml\includes\c14n.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\config.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\dtdvalid.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\etreepublic.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\htmlparser.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\relaxng.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\schematron.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\tree.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\uri.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\xinclude.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\xmlerror.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\xmlparser.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\xmlschema.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\xpath.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\xslt.pxd -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\etree_defs.h -&gt; build\lib.win32-3.4\lxml\includes
  
  copying src\lxml\includes\lxml-version.h -&gt; build\lib.win32-3.4\lxml\includes
  
  creating build\lib.win32-3.4\lxml\isoschematron\resources
  
  creating build\lib.win32-3.4\lxml\isoschematron\resources\rng
  
  copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -&gt; build\lib.win32-3.4\lxml\isoschematron\resources\rng
  
  creating build\lib.win32-3.4\lxml\isoschematron\resources\xsl
  
  copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -&gt; build\lib.win32-3.4\lxml\isoschematron\resources\xsl
  
  copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -&gt; build\lib.win32-3.4\lxml\isoschematron\resources\xsl
  
  creating build\lib.win32-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -&gt; build\lib.win32-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -&gt; build\lib.win32-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -&gt; build\lib.win32-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -&gt; build\lib.win32-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -&gt; build\lib.win32-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -&gt; build\lib.win32-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  
  running build_ext
  
  building 'lxml.etree' extension
  
  C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
  
    warnings.warn(msg)
  
  error: Unable to find vcvarsall.bat
  
  ----------------------------------------
  Cleaning up...
  Command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\CARTE_~1\\AppData\\Local\\Temp\\pip_build_carte_000\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\CARTE_~1\AppData\Local\Temp\pip-l8vvrv9g-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in C:\Users\CARTE_~1\AppData\Local\Temp\pip_build_carte_000\lxml
  Storing debug log for failure in C:\Users\carte_000\pip\pip.log
  </code></pre>
  
  <p>So then I looked on this great and helpful thing called <em>The Internet</em> and a lot of people have the same error of needing <code>libxml2</code> and <code>libxlst</code>. They recommend a guy called Christoph Gohlke's page where he provides some sort of binary thingy for a bunch of packages. You can find it <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/" rel="noreferrer">here</a> (<a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml" rel="noreferrer">quicklink to the lxml part</a>).</p>
  
  <p>So after I gave up on trying to find libxml2 and libxslt for pip, I decided to go there, and found <em>an absolute ton</em> of downloads. I know I need a 64-bit one, but I have no idea which "<code>cp</code>" I need.</p>
  
  <p>So an answer either giving me a solution on the <code>pip</code> method or the Gohlke index method would be great.</p>