title: Can't install lxml on python 3.5
body: <p>I searched for solution to my problem through this and other sites. Unfortunately, none of given solutions helped me.</p>
  
  <p>My problem is the following. I'd like to install python lxml library but every time I get errors.</p>
  
  <p>1) When I try install lxml in pycharm , I get the follwoing error:</p>
  
  <pre><code>ERROR: b"'xslt-config' is not recognized as an internal or external      command,\r\noperable program or batch file.\r\n"
  </code></pre>
  
  <p>2) When I try install lxml in command line with pip install lxml, I get the following error:</p>
  
  <pre><code>C:\Windows\system32&gt;pip install lxml
  Collecting lxml
    Using cached lxml-3.6.0.tar.gz
  Installing collected packages: lxml
    Running setup.py install for lxml ... error
      Complete output from command "c:\program files\python35\python.exe" -u -c "i
  mport setuptools, tokenize;__file__='C:\\Users\\forucell\\AppData\\Local\\Temp\\
  pip-build-cwlxrbh_\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)
  (__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:
  \Users\forucell\AppData\Local\Temp\pip-vx4433si-record\install-record.txt --sing
  le-version-externally-managed --compile:
      Building lxml version 3.6.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
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.5
      creating build\lib.win-amd64-3.5\lxml
      copying src\lxml\builder.py -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\cssselect.py -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\doctestcompare.py -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\ElementInclude.py -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\pyclasslookup.py -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\sax.py -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\usedoctest.py -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\_elementpath.py -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\__init__.py -&gt; build\lib.win-amd64-3.5\lxml
      creating build\lib.win-amd64-3.5\lxml\includes
      copying src\lxml\includes\__init__.py -&gt; build\lib.win-amd64-3.5\lxml\includ
  es
      creating build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\builder.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\clean.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\defs.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\diff.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\ElementSoup.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\formfill.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\html5parser.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\soupparser.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\usedoctest.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\_diffcommand.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\_html5builder.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\_setmixin.py -&gt; build\lib.win-amd64-3.5\lxml\html
      copying src\lxml\html\__init__.py -&gt; build\lib.win-amd64-3.5\lxml\html
      creating build\lib.win-amd64-3.5\lxml\isoschematron
      copying src\lxml\isoschematron\__init__.py -&gt; build\lib.win-amd64-3.5\lxml\i
  soschematron
      copying src\lxml\lxml.etree.h -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\lxml.etree_api.h -&gt; build\lib.win-amd64-3.5\lxml
      copying src\lxml\includes\c14n.pxd -&gt; build\lib.win-amd64-3.5\lxml\includes
      copying src\lxml\includes\config.pxd -&gt; build\lib.win-amd64-3.5\lxml\include
  s
      copying src\lxml\includes\dtdvalid.pxd -&gt; build\lib.win-amd64-3.5\lxml\inclu
  des
      copying src\lxml\includes\etreepublic.pxd -&gt; build\lib.win-amd64-3.5\lxml\in
  cludes
      copying src\lxml\includes\htmlparser.pxd -&gt; build\lib.win-amd64-3.5\lxml\inc
  ludes
      copying src\lxml\includes\relaxng.pxd -&gt; build\lib.win-amd64-3.5\lxml\includ
  es
      copying src\lxml\includes\schematron.pxd -&gt; build\lib.win-amd64-3.5\lxml\inc
  ludes
      copying src\lxml\includes\tree.pxd -&gt; build\lib.win-amd64-3.5\lxml\includes
      copying src\lxml\includes\uri.pxd -&gt; build\lib.win-amd64-3.5\lxml\includes
      copying src\lxml\includes\xinclude.pxd -&gt; build\lib.win-amd64-3.5\lxml\inclu
  des
      copying src\lxml\includes\xmlerror.pxd -&gt; build\lib.win-amd64-3.5\lxml\inclu
  des
      copying src\lxml\includes\xmlparser.pxd -&gt; build\lib.win-amd64-3.5\lxml\incl
  udes
      copying src\lxml\includes\xmlschema.pxd -&gt; build\lib.win-amd64-3.5\lxml\incl
  udes
      copying src\lxml\includes\xpath.pxd -&gt; build\lib.win-amd64-3.5\lxml\includes
  
      copying src\lxml\includes\xslt.pxd -&gt; build\lib.win-amd64-3.5\lxml\includes
      copying src\lxml\includes\etree_defs.h -&gt; build\lib.win-amd64-3.5\lxml\inclu
  des
      copying src\lxml\includes\lxml-version.h -&gt; build\lib.win-amd64-3.5\lxml\inc
  ludes
      creating build\lib.win-amd64-3.5\lxml\isoschematron\resources
      creating build\lib.win-amd64-3.5\lxml\isoschematron\resources\rng
      copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -&gt; build\lib
  .win-amd64-3.5\lxml\isoschematron\resources\rng
      creating build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl
      copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -&gt; build\lib.win
  -amd64-3.5\lxml\isoschematron\resources\xsl
      copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -&gt; build\lib.win
  -amd64-3.5\lxml\isoschematron\resources\xsl
      creating build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schema
  tron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstra
  ct_expand.xsl -&gt; build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-sc
  hematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_i
  nclude.xsl -&gt; build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schem
  atron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schema
  tron_message.xsl -&gt; build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso
  -schematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schema
  tron_skeleton_for_xslt1.xsl -&gt; build\lib.win-amd64-3.5\lxml\isoschematron\resour
  ces\xsl\iso-schematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_f
  or_xslt1.xsl -&gt; build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-sch
  ematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt
   -&gt; build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt
  1
      running build_ext
      building 'lxml.etree' extension
      creating build\temp.win-amd64-3.5
      creating build\temp.win-amd64-3.5\Release
      creating build\temp.win-amd64-3.5\Release\src
      creating build\temp.win-amd64-3.5\Release\src\lxml
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /
  nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc\lxml\includes "-Ic:\program files\python35
  \include" "-Ic:\program files\python35\include" "-IC:\Program Files (x86)\Micros
  oft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual St
  udio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\1
  0.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\
  um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Fi
  les (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8
  .1\include\\winrt" /Tcsrc\lxml\lxml.etree.c /Fobuild\temp.win-amd64-3.5\Release\
  src\lxml\lxml.etree.obj -w
      cl : Command line warning D9025 : overriding '/W3' with '/w'
      lxml.etree.c
      src\lxml\includes\etree_defs.h(14): fatal error C1083: Cannot open include f
  ile: 'libxml/xmlversion.h': No such file or directory
      Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14
  .0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2
      creating Users
      creating Users\forucell
      creating Users\forucell\AppData
      creating Users\forucell\AppData\Local
      creating Users\forucell\AppData\Local\Temp
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /
  nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files (x86)
  \Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Vi
  sual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\in
  clude\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\i
  nclude\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Pro
  gram Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows
   Kits\8.1\include\\winrt" /TcC:\Users\forucell\AppData\Local\Temp\xmlXPathInit2v
  eo73kj.c /FoUsers\forucell\AppData\Local\Temp\xmlXPathInit2veo73kj.obj
      xmlXPathInit2veo73kj.c
      C:\Users\forucell\AppData\Local\Temp\xmlXPathInit2veo73kj.c(1): fatal error
  C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
      ****************************************************************************
  *****
      Could not find function xmlCheckVersion in library libxml2. Is libxml2 insta
  lled?
      ****************************************************************************
  *****
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B
  IN\\amd64\\cl.exe' failed with exit status 2
  
      ----------------------------------------
  Command ""c:\program files\python35\python.exe" -u -c "import setuptools, tokeni
  ze;__file__='C:\\Users\\forucell\\AppData\\Local\\Temp\\pip-build-cwlxrbh_\\lxml
  \\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replac
  e('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\forucell\AppData\
  Local\Temp\pip-vx4433si-record\install-record.txt --single-version-externally-ma
  naged --compile" failed with error code 1 in C:\Users\forucell\AppData\Local\Tem
  p\pip-build-cwlxrbh_\lxml\
  </code></pre>
  
  <p>3) When I try install lxml in whl format, I get the follwoing error:</p>
  
  <pre><code>Exception:
  Traceback (most recent call last):
    File "C:\Program Files\Python35\lib\site-packages\pip\basecommand.py", line 21
  5, in main
      status = self.run(options, args)
    File "C:\Program Files\Python35\lib\site-packages\pip\commands\install.py", li
  ne 317, in run
      prefix=options.prefix_path,
    File "C:\Program Files\Python35\lib\site-packages\pip\req\req_set.py", line 74
  2, in install
      **kwargs
    File "C:\Program Files\Python35\lib\site-packages\pip\req\req_install.py", lin
  e 831, in install
      self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
    File "C:\Program Files\Python35\lib\site-packages\pip\req\req_install.py", lin
  e 1032, in move_wheel_files
      isolated=self.isolated,
    File "C:\Program Files\Python35\lib\site-packages\pip\wheel.py", line 346, in
  move_wheel_files
      clobber(source, lib_dir, True)
    File "C:\Program Files\Python35\lib\site-packages\pip\wheel.py", line 317, in
  clobber
      ensure_dir(destdir)
    File "C:\Program Files\Python35\lib\site-packages\pip\utils\__init__.py", line
   83, in ensure_dir
      os.makedirs(path)
    File "C:\Program Files\Python35\lib\os.py", line 241, in makedirs
      mkdir(name, mode)
  PermissionError: [WinError 5] Access is denied: 'C:\\Program Files\\Python35\\Li
  b\\site-packages\\lxml
  </code></pre>
  
  <p>Please help me. Thanks in advance.</p>