python-docx-template
python-docx-template copied to clipboard
pip install docxtpl error
when i excute pip install docxtpl
then error occured
Python 2.7.16
Python 3.9.4
I try these version , always occur this error: help
creating build/lib.macosx-10.15-x86_64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.15-x86_64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.15-x86_64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.15-x86_64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.15-x86_64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.15-x86_64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.15-x86_64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 running build_ext building 'lxml.etree' extension creating build/temp.macosx-10.15-x86_64-cpython-39 creating build/temp.macosx-10.15-x86_64-cpython-39/src creating build/temp.macosx-10.15-x86_64-cpython-39/src/lxml clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/lxml/etree.c -o build/temp.macosx-10.15-x86_64-cpython-39/src/lxml/etree.o -w -flat_namespace In file included from src/lxml/etree.c:864: src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found #include "libxml/xmlversion.h" ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. Compile failed: command '/usr/bin/clang' failed with exit code 1 creating var creating var/folders creating var/folders/6g creating var/folders/6g/vjt1b74d5yl0xbfnjjqm0f180000gn creating var/folders/6g/vjt1b74d5yl0xbfnjjqm0f180000gn/T cc -I/usr/include/libxml2 -c /var/folders/6g/vjt1b74d5yl0xbfnjjqm0f180000gn/T/xmlXPathInitt_vv0ian.c -o var/folders/6g/vjt1b74d5yl0xbfnjjqm0f180000gn/T/xmlXPathInitt_vv0ian.o /var/folders/6g/vjt1b74d5yl0xbfnjjqm0f180000gn/T/xmlXPathInitt_vv0ian.c:1:10: fatal error: 'libxml/xpath.h' file not found #include "libxml/xpath.h" ^~~~~~~~~~~~~~~~ 1 error generated. ********************************************************************************* Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? Perhaps try: xcode-select --install ********************************************************************************* error: command '/usr/bin/clang' failed with exit code 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for lxml Running setup.py clean for lxml Failed to build lxml ERROR: Could not build wheels for lxml, which is required to install pyproject.toml-based projects
export CPATH="/usr/local/Cellar/libxml2/2.9.10_2/include/libxml2:$CPATH" add this can work ,thank you