各位好,如题,google了2天,已经安装了所需的各种环境,也安装了cython,也换了几个termux版本,始终无法解决,日志如下,向各位求助。
pip install lxml Collecting lxml Using cached lxml-4.9.3.tar.gz (3.6 MB) Installing build dependencies … done Getting requirements to build wheel … done Preparing metadata (pyproject.toml) … done Building wheels for collected packages: lxml Building wheel for lxml (pyproject.toml) … error error: subprocess-exited-with-error × Building wheel for lxml (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [173 lines of output] <string>:67: DeprecationWarning: pkg_resources is deprecated as an API. See [链接登录后可见] Building lxml version 4.9.3. Building without Cython. Building against libxml2 2.12.1 and libxslt 1.1.39 Building against libxml2/libxslt in the following directory: /data/data/com.termux/files/usr/lib
running bdist_wheel running build
running build_py creating build creating build/lib.linux-aarch64-cpython-311 creating build/lib.linux-aarch64-cpython-311/lxml copying src/lxml/ElementInclude.py -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/init.py -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/elementpath.py -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/builder.py -> build/lib.linux-aarch64-cpython-311/lxml copying src/lxml/cssselect.py -> build/lib.linux-aarch64-cpython-311/lxml copying src/lxml/doctestcompare.py -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-aarch64-cpython-311/lxml copying src/lxml/sax.py -> build/lib.linux-aarch64-cpython-311/lxml copying src/lxml/usedoctest.py -> build/lib.linux-aarch64-cpython-311/lxml creating build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/init.py -> build/lib.linux-aarch64-cpython-311/lxml/includes
creating build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-aarch64-cpython-311/lxml/html copying src/lxml/html/init.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/diffcommand.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/html5builder.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/setmixin.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-aarch64-cpython-311/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-aarch64-cpython-311/lxml/html
creating build/lib.linux-aarch64-cpython-311/lxml/isoschematron
copying src/lxml/isoschematron/init.py -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/etree_api.h -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/lxml.etree.h -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/etree.pyx -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/objectify.pyx -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/apihelpers.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/classlookup.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/cleanup.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/debug.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/docloader.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/dtd.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/extensions.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/iterparse.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/nsclasses.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/objectpath.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/parser.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/parsertarget.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/proxy.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/public-api.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/readonlytree.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/relaxng.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/saxparser.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/schematron.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/serializer.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/xinclude.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/xmlerror.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/xmlid.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/xmlschema.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/xpath.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/xslt.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/xsltext.pxi -> build/lib.linux-aarch64-cpython-311/lxml
copying src/lxml/includes/init.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-aarch64-cpython-311/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-aarch64-cpython-311/lxml/includes
creating build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources
creating build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/rng
creating build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl
creating build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-aarch64-cpython-311/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building ‘lxml.etree’ extension
creating build/temp.linux-aarch64-cpython-311
creating build/temp.linux-aarch64-cpython-311/src
creating build/temp.linux-aarch64-cpython-311/src/lxml
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/data/data/com.termux/files/usr/include/libxml2 -I/data/data/com.termux/files/usr/include -Isrc -Isrc/lxml/includes -I/data/data/com.termux/files/usr/include/python3.11 -c src/lxml/etree.c -o build/temp.linux-aarch64-cpython-311/src/lxml/etree.o -w
src/lxml/etree.c:113152:38: error: incompatible function pointer types assigning to ‘xmlStructuredErrorFunc’ (aka ‘void (*)(void *, const struct _xmlError *)’) from ‘void (void *, xmlError *)’ (aka ‘void (void *, struct xmlError )’) [-Wincompatible-function-pointer-types]
113152 | __pyx_v_self->c_ctxt->sax->serror = pyx_f_4lxml_5etreereceiveParserError;
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/etree.c:117640:25: error: incompatible function pointer types assigning to ‘xmlStructuredErrorFunc’ (aka ‘void ()(void *, const struct _xmlError *)’) from ‘void (void *, xmlError *)’ (aka ‘void (void *, struct _xmlError )’) [-Wincompatible-function-pointer-types]
117640 | __pyx_v_sax->serror = pyx_f_4lxml_5etreereceiveParserError;
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/etree.c:181724:28: error: incompatible function pointer types assigning to ‘xmlStructuredErrorFunc’ (aka ‘void ()(void *, const struct _xmlError *)’) from ‘void (void *, xmlError *)’ (aka ‘void (void *, struct _xmlError *)’) [-Wincompatible-function-pointer-types]
181724 | __pyx_v_xpathCtxt->error = pyx_f_4lxml_5etreereceiveXPathError;
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/etree.c:218998:60: error: incompatible function pointer types passing ‘void (void *, xmlError *)’ (aka ‘void (void *, struct _xmlError )’) to parameter of type ‘xmlStructuredErrorFunc’ (aka ‘void ()(void *, const struct xmlError *)’) [-Wincompatible-function-pointer-types]
218998 | xmlRelaxNGSetParserStructuredErrors(__pyx_v_parser_ctxt, pyx_f_4lxml_5etreereceiveError, ((void *)pyx_v_self->pyx_base.error_log));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/libxml2/libxml/relaxng.h:155:30: note: passing argument to parameter ‘serror’ here
155 | xmlStructuredErrorFunc serror,
| ^
src/lxml/etree.c:219416:60: error: incompatible function pointer types passing ‘void (void *, xmlError *)’ (aka ‘void (void *, struct _xmlError )’) to parameter of type ‘xmlStructuredErrorFunc’ (aka ‘void ()(void *, const struct xmlError *)’) [-Wincompatible-function-pointer-types]
219416 | xmlRelaxNGSetValidStructuredErrors(__pyx_v_valid_ctxt, pyx_f_4lxml_5etreereceiveError, ((void *)pyx_v_self->pyx_base.error_log));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/libxml2/libxml/relaxng.h:184:31: note: passing argument to parameter ‘serror’ here
184 | xmlStructuredErrorFunc serror, void *ctx);
| ^
src/lxml/etree.c:220305:59: error: incompatible function pointer types passing ‘void (void *, xmlError *)’ (aka ‘void (void *, struct _xmlError )’) to parameter of type ‘xmlStructuredErrorFunc’ (aka ‘void ()(void *, const struct xmlError *)’) [-Wincompatible-function-pointer-types]
220305 | xmlSchemaSetParserStructuredErrors(__pyx_v_parser_ctxt, pyx_f_4lxml_5etreereceiveError, ((void *)pyx_v_self->pyx_base.error_log));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/libxml2/libxml/xmlschemas.h:156:30: note: passing argument to parameter ‘serror’ here
156 | xmlStructuredErrorFunc serror,
| ^
src/lxml/etree.c:220848:59: error: incompatible function pointer types passing ‘void (void *, xmlError *)’ (aka ‘void (void *, struct _xmlError )’) to parameter of type ‘xmlStructuredErrorFunc’ (aka ‘void ()(void *, const struct xmlError *)’) [-Wincompatible-function-pointer-types]
220848 | xmlSchemaSetValidStructuredErrors(__pyx_v_valid_ctxt, pyx_f_4lxml_5etreereceiveError, ((void *)pyx_v_self->pyx_base.error_log));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/libxml2/libxml/xmlschemas.h:185:30: note: passing argument to parameter ‘serror’ here
185 | xmlStructuredErrorFunc serror,
| ^
src/lxml/etree.c:221613:66: error: incompatible function pointer types passing ‘void (void *, xmlError *)’ (aka ‘void (void *, struct _xmlError )’) to parameter of type ‘xmlStructuredErrorFunc’ (aka ‘void ()(void *, const struct xmlError *)’) [-Wincompatible-function-pointer-types]
221613 | xmlSchemaSetValidStructuredErrors(__pyx_v_self->valid_ctxt, pyx_f_4lxml_5etreereceiveError, ((void *)pyx_v_error_log));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/libxml2/libxml/xmlschemas.h:185:30: note: passing argument to parameter ‘serror’ here
185 | xmlStructuredErrorFunc serror,
| ^
src/lxml/etree.c:222790:63: error: incompatible function pointer types passing ‘void (void *, xmlError *)’ (aka ‘void (void *, struct _xmlError )’) to parameter of type ‘xmlStructuredErrorFunc’ (aka ‘void ()(void *, const struct xmlError *)’) [-Wincompatible-function-pointer-types]
222790 | xmlSchematronSetValidStructuredErrors(pyx_v_valid_ctxt, pyx_f_4lxml_5etreereceiveError, ((void *)pyx_v_self->pyx_base.error_log));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/libxml2/libxml/schematron.h:105:31: note: passing argument to parameter ‘serror’ here
105 | xmlStructuredErrorFunc serror,
| ^
9 errors generated.
Compile failed: command ‘/data/data/com.termux/files/usr/bin/aarch64-linux-android-clang’ failed with exit code 1
creating data
creating data/data
creating data/data/com.termux
creating data/data/com.termux/files
creating data/data/com.termux/files/usr
creating data/data/com.termux/files/usr/tmp
cc -I/data/data/com.termux/files/usr/include/libxml2 -I/data/data/com.termux/files/usr/include -I/usr/include/libxml2 -c /data/data/com.termux/files/usr/tmp/xmlXPathInitojlsncup.c -o data/data/com.termux/files/usr/tmp/xmlXPathInitojlsncup.o
/data/data/com.termux/files/usr/tmp/xmlXPathInitojlsncup.c:3:5: warning: ‘xmlXPathInit’ is deprecated [-Wdeprecated-declarations]
3 | xmlXPathInit();
| ^
/data/data/com.termux/files/usr/include/libxml2/libxml/xpath.h:562:1: note: ‘xmlXPathInit’ has been explicitly marked deprecated here
562 | XML_DEPRECATED
| ^
/data/data/com.termux/files/usr/include/libxml2/libxml/xmlversion.h:447:43: note: expanded from macro ‘XML_DEPRECATED’
447 | # define XML_DEPRECATED attribute((deprecated))
| ^
1 warning generated.
cc data/data/com.termux/files/usr/tmp/xmlXPathInitojlsncup.o -L/data/data/com.termux/files/usr/lib -lxml2 -o a.out
error: command ‘/data/data/com.termux/files/usr/bin/aarch64-linux-android-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
Failed to build lxml
ERROR: Could not build wheels for lxml, which is required to install pyproject.toml-based projects