installation on windows fails. #370

Closed
sander76 opened this Issue Oct 21, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@sander76

I follow the instructions like described on the website.
when I perform python -m pip install weasyprint

I get an error message asking me libxml2 is installed ?

Anyone a clue ?

Collecting weasyprint
  Using cached WeasyPrint-0.31.tar.gz
Collecting lxml>=3.0 (from weasyprint)
  Using cached lxml-3.6.4.tar.gz
Collecting html5lib>=0.999999999 (from weasyprint)
  Using cached html5lib-0.999999999.tar.gz
Collecting tinycss==0.3 (from weasyprint)
  Using cached tinycss-0.3.tar.gz
Collecting cssselect>=0.6 (from weasyprint)
  Using cached cssselect-0.9.2-py2.py3-none-any.whl
Collecting cffi>=0.6 (from weasyprint)
  Using cached cffi-1.8.3-cp27-cp27m-win_amd64.whl
Collecting cairocffi>=0.5 (from weasyprint)
  Using cached cairocffi-0.7.2.tar.gz
Collecting Pyphen>=0.8 (from weasyprint)
  Using cached Pyphen-0.9.4-py2.py3-none-any.whl
Collecting CairoSVG<2,>=1.0.20 (from weasyprint)
  Using cached CairoSVG-1.0.22.tar.gz
Collecting six (from html5lib>=0.999999999->weasyprint)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting webencodings (from html5lib>=0.999999999->weasyprint)
  Using cached webencodings-0.5.tar.gz
Requirement already satisfied (use --upgrade to upgrade): setuptools>=18.5 in c:\python27\lib\site-packages (from html5lib>=0.999999999->weasyprint)
Collecting pycparser (from cffi>=0.6->weasyprint)
  Using cached pycparser-2.16.tar.gz
Installing collected packages: lxml, six, webencodings, html5lib, tinycss, cssselect, pycparser, cffi, cairocffi, Pyphen, CairoSVG, weasyprint
  Running setup.py install for lxml: started
    Running setup.py install for lxml: finished with status 'error'
    Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\sander\\appdata\\local\\temp\\pip-build-axxt5o\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\sander\appdata\local\temp\pip-kxcriw-record\install-record.txt --single-version-externally-managed --compile:
    Building lxml version 3.6.4.
    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 build
    running build_py
    creating build
    creating build\lib.win-amd64-2.7
    creating build\lib.win-amd64-2.7\lxml
    copying src\lxml\builder.py -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\cssselect.py -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\doctestcompare.py -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\ElementInclude.py -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\sax.py -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\usedoctest.py -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\_elementpath.py -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\__init__.py -> build\lib.win-amd64-2.7\lxml
    creating build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\__init__.py -> build\lib.win-amd64-2.7\lxml\includes
    creating build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\builder.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\clean.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\defs.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\diff.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\formfill.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\html5parser.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\soupparser.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-2.7\lxml\html
    copying src\lxml\html\__init__.py -> build\lib.win-amd64-2.7\lxml\html
    creating build\lib.win-amd64-2.7\lxml\isoschematron
    copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-2.7\lxml\isoschematron
    copying src\lxml\lxml.etree.h -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-2.7\lxml
    copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\config.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-2.7\lxml\includes
    copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-2.7\lxml\includes
    creating build\lib.win-amd64-2.7\lxml\isoschematron\resources
    creating build\lib.win-amd64-2.7\lxml\isoschematron\resources\rng
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-2.7\lxml\isoschematron\resources\rng
    creating build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl
    creating build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    creating build\temp.win-amd64-2.7\Release\src
    creating build\temp.win-amd64-2.7\Release\src\lxml
    C:\Users\sander\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc\lxml\includes -IC:\Python27\include -IC:\Python27\PC /Tcsrc\lxml\lxml.etree.c /Fobuild\temp.win-amd64-2.7\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 file: 'libxml/xmlversion.h': No such file or directory
    Compile failed: command 'C:\\Users\\sander\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
    creating users
    creating users\sander
    creating users\sander\appdata
    creating users\sander\appdata\local
    creating users\sander\appdata\local\temp
    C:\Users\sander\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I/usr/include/libxml2 /Tcc:\users\sander\appdata\local\temp\xmlXPathInit4vflxj.c /Fousers\sander\appdata\local\temp\xmlXPathInit4vflxj.obj
    xmlXPathInit4vflxj.c
    c:\users\sander\appdata\local\temp\xmlXPathInit4vflxj.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 installed?
    *********************************************************************************
    error: command 'C:\\Users\\sander\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
@sander76

This comment has been minimized.

Show comment
Hide comment
@sander76

sander76 Oct 21, 2016

Did a manual install of lxml using a precompiled binary from (which has come to the rescue many times before !) :

http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

It works now !

Did a manual install of lxml using a precompiled binary from (which has come to the rescue many times before !) :

http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

It works now !

@liZe

This comment has been minimized.

Show comment
Hide comment
@liZe

liZe Oct 21, 2016

Member

Yes. Following the documentation was enough as long as there was a Windows wheel for lxml, but the current version (3.6.4) doesn't.

Time to change the documentation again.

Member

liZe commented Oct 21, 2016

Yes. Following the documentation was enough as long as there was a Windows wheel for lxml, but the current version (3.6.4) doesn't.

Time to change the documentation again.

@liZe liZe closed this in 88f961c Oct 21, 2016

@liZe liZe added the documentation label Oct 21, 2016

@liZe liZe self-assigned this Oct 21, 2016

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Jan 15, 2017

kleink
Update py-weasyprint to 0.34.
Version 0.34
------------

Released on 2016-12-21.

Bug fixes:

* `#398 <Kozea/WeasyPrint#398>`_:
  Honor the presentational_hints option for PDFs.
* `#399 <Kozea/WeasyPrint#399>`_:
  Avoid CairoSVG-2.0.0rc* on Python 2.
* `#396 <Kozea/WeasyPrint#396>`_:
  Correctly close files open by mkstemp.
* `#403 <Kozea/WeasyPrint#403>`_:
  Cast the number of columns into int.
* Fix multi-page multi-columns and add related tests.


Version 0.33
------------

Released on 2016-11-28.

New features:

* `#393 <Kozea/WeasyPrint#393:
  Add tests on MacOS.
* `#370 <Kozea/WeasyPrint#370>`_:
  Enable @font-face on MacOS.

Bug fixes:

* `#389 <Kozea/WeasyPrint#389>`_:
  Always update resume_at when splitting lines.
* `#394 <Kozea/WeasyPrint#394>`_:
  Don't build universal wheels.
* `#388 <Kozea/WeasyPrint#388>`_:
  Fix logic when finishing block formatting context.


Version 0.32
------------

Released on 2016-11-17.

New features:

* `#28 <Kozea/WeasyPrint#28>`_:
  Support @font-face on Linux.
* Support CSS fonts level 3 almost entirely, including OpenType features.
* `#253 <Kozea/WeasyPrint#253>`_:
  Support presentational hints (optional).
* Support break-after, break-before and break-inside for pages and columns.
* `#384 <Kozea/WeasyPrint#384:
  Major performance boost.

Bux fixes:

* `#368 <Kozea/WeasyPrint#368>`_:
  Respect white-space for shrink-to-fit.
* `#382 <Kozea/WeasyPrint#382>`_:
  Fix the preferred width for column groups.
* Handle relative boxes in column-layout boxes.

Documentation:

* Add more and more documentation about Windows installation.
* `#355 <Kozea/WeasyPrint#355:
  Add fonts requirements for tests.


Version 0.31
------------

Released on 2016-08-28.

New features:

* `#124 <Kozea/WeasyPrint#124>`_:
  Add MIME sniffing for images.
* `#60 <Kozea/WeasyPrint#60>`_:
  CSS Multi-column Layout.
* `#197 <Kozea/WeasyPrint#197>`_:
  Add hyphens at line breaks activated by a soft hyphen.

Bux fixes:

* `#132 <Kozea/WeasyPrint#132>`_:
  Fix Python 3 compatibility on Windows.

Documentation:

* `#329 <Kozea/WeasyPrint#329>`_:
  Add documentation about installation on Windows.


Version 0.30
------------

Released on 2016-07-18.

WeasyPrint now depends on html5lib-0.999999999.

Bux fixes:

* Fix Acid2
* `#325 <Kozea/WeasyPrint#325>`_:
  Cutting lines is broken in page margin boxes.
* `#334 <Kozea/WeasyPrint#334>`_:
  Newest html5lib 0.999999999 breaks rendering.


Version 0.29
------------

Released on 2016-06-17.

Bug fixes:

* `#263 <Kozea/WeasyPrint#263:
  Don't crash with floats with percents in positions.
* `#323 <Kozea/WeasyPrint#323>`_:
  Fix CairoSVG 2.0 pre-release dependency in Python 2.x.


Version 0.28
------------

Released on 2016-05-16.

Bug fixes:

* `#189 <Kozea/WeasyPrint#189>`_:
  ``white-space: nowrap`` still wraps on hyphens
* `#305 <Kozea/WeasyPrint#305>`_:
  Fix crashes on some tables
* Don't crash when transform matrix isn't invertible
* Don't crash when rendering ratio-only SVG images
* Fix margins and borders on some tables


Version 0.27
------------

Released on 2016-04-08.

New features:

* `#295 <Kozea/WeasyPrint#295>`_:
  Support the 'rem' unit.
* `#299 <Kozea/WeasyPrint#299>`_:
  Enhance the support of SVG images.

Bug fixes:

* `#307 <Kozea/WeasyPrint#307>`_:
  Fix the layout of cells larger than their tables.

Documentation:

* The website is now on GitHub Pages, the documentation is on Read the Docs.
* `#297 <Kozea/WeasyPrint#297>`_:
  Rewrite the CSS chapter of the documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment