lxml 无法使用 python 3.7 安装

Kar*_*ten 3 lxml pip python-3.7

我无法在 python 环境中安装 libxml 来安装 sofort\npython: Python 3.7.3\n已经做了: apt-get --reinstalll install python-dev libxml2-dev libxslt1-dev zlib1g-dev\n当尝试安装 libxml 时,它会调用关于 PyObject 的错误有这样的错误

\n\n
398                    (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ?  (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL)\n\n
Run Code Online (Sandbox Code Playgroud)\n\n

长输出:

\n\n
Collecting sofort\n  Using cached https://files.pythonhosted.org/packages/8d/85/b51f32001315aed58dc7db71fc558b0c14b2f311f18292854f2981826910/sofort-0.4.3-py3-none-any.whl\nCollecting lxml<4.0,>=3.5 (from sofort)\n  Using cached https://files.pythonhosted.org/packages/20/b3/9f245de14b7696e2d2a386c0b09032a2ff6625270761d6543827e667d8de/lxml-3.8.0.tar.gz\nRequirement already satisfied: requests<3.0,>=2.9 in ./env/lib/python3.7/site-packages (from sofort) (2.22.0)\nRequirement already satisfied: schematics<2.0,>=1.1 in ./env/lib/python3.7/site-packages (from sofort) (1.1.3)\nRequirement already satisfied: xmltodict<1.0,>=0.9 in ./env/lib/python3.7/site-packages (from sofort) (0.12.0)\nRequirement already satisfied: iso8601<1.0,>=0.1 in ./env/lib/python3.7/site-packages (from sofort) (0.1.12)\nRequirement already satisfied: certifi>=2017.4.17 in ./env/lib/python3.7/site-packages (from requests<3.0,>=2.9->sofort) (2019.9.11)\nRequirement already satisfied: idna<2.9,>=2.5 in ./env/lib/python3.7/site-packages (from requests<3.0,>=2.9->sofort) (2.8)\nRequirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./env/lib/python3.7/site-packages (from requests<3.0,>=2.9->sofort) (1.25.6)\nRequirement already satisfied: chardet<3.1.0,>=3.0.2 in ./env/lib/python3.7/site-packages (from requests<3.0,>=2.9->sofort) (3.0.4)\nRequirement already satisfied: six>=1.7.3 in ./env/lib/python3.7/site-packages (from schematics<2.0,>=1.1->sofort) (1.12.0)\nBuilding wheels for collected packages: lxml\n  Running setup.py bdist_wheel for lxml ... error\n  Complete output from command /home/test7/myweb/env/bin/python3.7 -u -c "import setuptools, tokenize;__file__=\'/tmp/pip-install-o_pr8d68/lxml/setup.py\';f=getattr(tokenize, \'open\', open)(__file__);code=f.read().replace(\'\\r\\n\', \'\\n\');f.close();exec(compile(code, __file__, \'exec\'))" bdist_wheel -d /tmp/pip-wheel-9u9hnke4 --python-tag cp37:\n  Building lxml version 3.8.0.\n  Building without Cython.\n  Using build configuration of libxslt 1.1.32\n  running bdist_wheel\n  running build\n  running build_py\n  creating build\n  creating build/lib.linux-x86_64-3.7\n  creating build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/sax.py -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/builder.py -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.7/lxml\n  creating build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.7/lxml/includes\n  creating build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.7/lxml/html\n  copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.7/lxml/html\n  creating build/lib.linux-x86_64-3.7/lxml/isoschematron\n  copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.7/lxml/isoschematron\n  copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.7/lxml\n  copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.7/lxml/includes\n  copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.7/lxml/includes\n  creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources\n  creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/rng\n  copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/rng\n  creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl\n  copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl\n  copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl\n  creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1\n  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1\n  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1\n  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1\n  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1\n  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1\n  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1\n  running build_ext\n  building \'lxml.etree\' extension\n  creating build/temp.linux-x86_64-3.7\n  creating build/temp.linux-x86_64-3.7/src\n  creating build/temp.linux-x86_64-3.7/src/lxml\n  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/home/test7/myweb/env/include -I/usr/include/python3.7m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.7/src/lxml/lxml.etree.o -w\n  src/lxml/lxml.etree.c: In function \xe2\x80\x98__Pyx_PyCFunction_FastCall\xe2\x80\x99:\n  src/lxml/lxml.etree.c:233279:13: error: too many arguments to function \xe2\x80\x98(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth\xe2\x80\x99\n       return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);\n              ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  src/lxml/lxml.etree.c: In function \xe2\x80\x98__Pyx_PyDict_Items\xe2\x80\x99:\n  src/lxml/lxml.etree.c:4532:83: error: too many arguments to function \xe2\x80\x98(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyDict_Type_items.func\xe2\x80\x99\n                 (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ?  (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\\\n                                                                                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  src/lxml/lxml.etree.c:233529:16: note: in expansion of macro \xe2\x80\x98__Pyx_CallUnboundCMethod0\xe2\x80\x99\n           return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);\n                  ^~~~~~~~~~~~~~~~~~~~~~~~~\n  src/lxml/lxml.etree.c: In function \xe2\x80\x98__Pyx__ExceptionSave\xe2\x80\x99:\n  src/lxml/lxml.etree.c:233753:21: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_type\xe2\x80\x99; did you mean \xe2\x80\x98curexc_type\xe2\x80\x99?\n       *type = tstate->exc_type;\n                       ^~~~~~~~\n                       curexc_type\n  src/lxml/lxml.etree.c:233754:22: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_value\xe2\x80\x99; did you mean \xe2\x80\x98curexc_value\xe2\x80\x99?\n       *value = tstate->exc_value;\n                        ^~~~~~~~~\n                        curexc_value\n  src/lxml/lxml.etree.c:233755:19: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_traceback\xe2\x80\x99; did you mean \xe2\x80\x98curexc_traceback\xe2\x80\x99?\n       *tb = tstate->exc_traceback;\n                     ^~~~~~~~~~~~~\n                     curexc_traceback\n  src/lxml/lxml.etree.c: In function \xe2\x80\x98__Pyx__ExceptionReset\xe2\x80\x99:\n  src/lxml/lxml.etree.c:233762:24: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_type\xe2\x80\x99; did you mean \xe2\x80\x98curexc_type\xe2\x80\x99?\n       tmp_type = tstate->exc_type;\n                          ^~~~~~~~\n                          curexc_type\n  src/lxml/lxml.etree.c:233763:25: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_value\xe2\x80\x99; did you mean \xe2\x80\x98curexc_value\xe2\x80\x99?\n       tmp_value = tstate->exc_value;\n                           ^~~~~~~~~\n                           curexc_value\n  src/lxml/lxml.etree.c:233764:22: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_traceback\xe2\x80\x99; did you mean \xe2\x80\x98curexc_traceback\xe2\x80\x99?\n       tmp_tb = tstate->exc_traceback;\n                        ^~~~~~~~~~~~~\n                        curexc_traceback\n  src/lxml/lxml.etree.c:233765:13: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_type\xe2\x80\x99; did you mean \xe2\x80\x98curexc_type\xe2\x80\x99?\n       tstate->exc_type = type;\n               ^~~~~~~~\n               curexc_type\n  src/lxml/lxml.etree.c:233766:13: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_value\xe2\x80\x99; did you mean \xe2\x80\x98curexc_value\xe2\x80\x99?\n       tstate->exc_value = value;\n               ^~~~~~~~~\n               curexc_value\n  src/lxml/lxml.etree.c:233767:13: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_traceback\xe2\x80\x99; did you mean \xe2\x80\x98curexc_traceback\xe2\x80\x99?\n       tstate->exc_traceback = tb;\n               ^~~~~~~~~~~~~\n               curexc_traceback\n  src/lxml/lxml.etree.c: In function \xe2\x80\x98__Pyx__GetException\xe2\x80\x99:\n  src/lxml/lxml.etree.c:233822:24: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_type\xe2\x80\x99; did you mean \xe2\x80\x98curexc_type\xe2\x80\x99?\n       tmp_type = tstate->exc_type;\n                          ^~~~~~~~\n                          curexc_type\n  src/lxml/lxml.etree.c:233823:25: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_value\xe2\x80\x99; did you mean \xe2\x80\x98curexc_value\xe2\x80\x99?\n       tmp_value = tstate->exc_value;\n                           ^~~~~~~~~\n                           curexc_value\n  src/lxml/lxml.etree.c:233824:22: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_traceback\xe2\x80\x99; did you mean \xe2\x80\x98curexc_traceback\xe2\x80\x99?\n       tmp_tb = tstate->exc_traceback;\n                        ^~~~~~~~~~~~~\n                        curexc_traceback\n  src/lxml/lxml.etree.c:233825:13: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_type\xe2\x80\x99; did you mean \xe2\x80\x98curexc_type\xe2\x80\x99?\n       tstate->exc_type = local_type;\n               ^~~~~~~~\n               curexc_type\n  src/lxml/lxml.etree.c:233826:13: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_value\xe2\x80\x99; did you mean \xe2\x80\x98curexc_value\xe2\x80\x99?\n       tstate->exc_value = local_value;\n               ^~~~~~~~~\n               curexc_value\n  src/lxml/lxml.etree.c:233827:13: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_traceback\xe2\x80\x99; did you mean \xe2\x80\x98curexc_traceback\xe2\x80\x99?\n       tstate->exc_traceback = local_tb;\n               ^~~~~~~~~~~~~\n               curexc_traceback\n  src/lxml/lxml.etree.c: In function \xe2\x80\x98__Pyx__ExceptionSwap\xe2\x80\x99:\n  src/lxml/lxml.etree.c:234160:24: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_type\xe2\x80\x99; did you mean \xe2\x80\x98curexc_type\xe2\x80\x99?\n       tmp_type = tstate->exc_type;\n                          ^~~~~~~~\n                          curexc_type\n  src/lxml/lxml.etree.c:234161:25: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_value\xe2\x80\x99; did you mean \xe2\x80\x98curexc_value\xe2\x80\x99?\n       tmp_value = tstate->exc_value;\n                           ^~~~~~~~~\n                           curexc_value\n  src/lxml/lxml.etree.c:234162:22: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_traceback\xe2\x80\x99; did you mean \xe2\x80\x98curexc_traceback\xe2\x80\x99?\n       tmp_tb = tstate->exc_traceback;\n                        ^~~~~~~~~~~~~\n                        curexc_traceback\n  src/lxml/lxml.etree.c:234163:13: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_type\xe2\x80\x99; did you mean \xe2\x80\x98curexc_type\xe2\x80\x99?\n       tstate->exc_type = *type;\n               ^~~~~~~~\n               curexc_type\n  src/lxml/lxml.etree.c:234164:13: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_value\xe2\x80\x99; did you mean \xe2\x80\x98curexc_value\xe2\x80\x99?\n       tstate->exc_value = *value;\n               ^~~~~~~~~\n               curexc_value\n  src/lxml/lxml.etree.c:234165:13: error: \xe2\x80\x98PyThreadState\xe2\x80\x99 {aka \xe2\x80\x98struct _ts\xe2\x80\x99} has no member named \xe2\x80\x98exc_traceback\xe2\x80\x99; did you mean \xe2\x80\x98curexc_traceback\xe2\x80\x99?\n       tstate->exc_traceback = *tb;\n               ^~~~~~~~~~~~~\n               curexc_traceback\n  src/lxml/lxml.etree.c: In function \xe2\x80\x98__Pyx_PyList_Pop\xe2\x80\x99:\n  src/lxml/lxml.etree.c:4532:83: error: too many arguments to function \xe2\x80\x98(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyList_Type_pop.func\xe2\x80\x99\n                 (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ?  (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\\\n                                                                                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  src/lxml/lxml.etree.c:234476:12: note: in expansion of macro \xe2\x80\x98__Pyx_CallUnboundCMethod0\xe2\x80\x99\n       return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyList_Type_pop, L);\n              ^~~~~~~~~~~~~~~~~~~~~~~~~\n  src/lxml/lxml.etree.c: In function \xe2\x80\x98__Pyx_PyDict_Values\xe2\x80\x99:\n  src/lxml/lxml.etree.c:4532:83: error: too many arguments to function \xe2\x80\x98(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyDict_Type_values.func\xe2\x80\x99\n                 (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ?  (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\\\n                                                                                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  src/lxml/lxml.etree.c:235119:16: note: in expansion of macro \xe2\x80\x98__Pyx_CallUnboundCMethod0\xe2\x80\x99\n           return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);\n                  ^~~~~~~~~~~~~~~~~~~~~~~~~\n  Compile failed: command \'x86_64-linux-gnu-gcc\' failed with exit status 1\n  creating tmp\n  cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit15huy_ms.c -o tmp/xmlXPathInit15huy_ms.o\n  /tmp/xmlXPathInit15huy_ms.c:2:1: warning: return type defaults to \xe2\x80\x98int\xe2\x80\x99 [-Wimplicit-int]\n   main (int argc, char **argv) {\n   ^~~~\n  cc tmp/xmlXPathInit15huy_ms.o -lxml2 -o a.out\n  error: command \'x86_64-linux-gnu-gcc\' failed with exit status 1\n\n  ----------------------------------------\n  Failed building wheel for lxml\n  Running setup.py clean for lxml\nFailed to build lxml\n\n[...]\n    copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/rng\n    creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl\n    copying src/lxml/isoschematron/resources/xsl/RN

phd*_*phd 6

sofort声明依赖项 lxml >= 3.5, < 4.0,因此pip使用最新的合适版本 lxml 3.8。版本比较老,不提供Python 3.7的轮子,只提供2.6-3.6。也许该版本与 Python 3.7 不兼容,无法从源代码编译。

降级到 Python 3.6。并 pingsofort作者进行升级。或者更好地向他们发送拉取请求。