gpt4 book ai didi

pip - lxml 无法使用 python 3.7 安装

转载 作者:行者123 更新时间:2023-12-04 01:37:44 25 4
gpt4 key购买 nike

我无法在我的 python 环境中安装 libxml 来安装 sofort python : python 3.7.3已经做了: apt-get --reinstalll install python-dev libxml2-dev libxslt1-dev zlib1g-dev尝试安装 libxml 时,它会调用有关 PyObject 的错误,并出现此类错误

398                    (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ?  (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL)

长输出:

Collecting sofort
Using cached https://files.pythonhosted.org/packages/8d/85/b51f32001315aed58dc7db71fc558b0c14b2f311f18292854f2981826910/sofort-0.4.3-py3-none-any.whl
Collecting lxml<4.0,>=3.5 (from sofort)
Using cached https://files.pythonhosted.org/packages/20/b3/9f245de14b7696e2d2a386c0b09032a2ff6625270761d6543827e667d8de/lxml-3.8.0.tar.gz
Requirement already satisfied: requests<3.0,>=2.9 in ./env/lib/python3.7/site-packages (from sofort) (2.22.0)
Requirement already satisfied: schematics<2.0,>=1.1 in ./env/lib/python3.7/site-packages (from sofort) (1.1.3)
Requirement already satisfied: xmltodict<1.0,>=0.9 in ./env/lib/python3.7/site-packages (from sofort) (0.12.0)
Requirement already satisfied: iso8601<1.0,>=0.1 in ./env/lib/python3.7/site-packages (from sofort) (0.1.12)
Requirement already satisfied: certifi>=2017.4.17 in ./env/lib/python3.7/site-packages (from requests<3.0,>=2.9->sofort) (2019.9.11)
Requirement already satisfied: idna<2.9,>=2.5 in ./env/lib/python3.7/site-packages (from requests<3.0,>=2.9->sofort) (2.8)
Requirement 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)
Requirement 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)
Requirement already satisfied: six>=1.7.3 in ./env/lib/python3.7/site-packages (from schematics<2.0,>=1.1->sofort) (1.12.0)
Building wheels for collected packages: lxml
Running setup.py bdist_wheel for lxml ... error
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:
Building lxml version 3.8.0.
Building without Cython.
Using build configuration of libxslt 1.1.32
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/sax.py -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/builder.py -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.7/lxml
creating build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.7/lxml/includes
creating build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.7/lxml/html
creating build/lib.linux-x86_64-3.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.7/lxml
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.7/lxml/includes
creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources
creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/rng
creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl
creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
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
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
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
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
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
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
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
creating build/temp.linux-x86_64-3.7/src/lxml
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
src/lxml/lxml.etree.c: In function ‘__Pyx_PyCFunction_FastCall’:
src/lxml/lxml.etree.c:233279:13: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth’
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c: In function ‘__Pyx_PyDict_Items’:
src/lxml/lxml.etree.c:4532:83: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyDict_Type_items.func’
(PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c:233529:16: note: in expansion of macro ‘__Pyx_CallUnboundCMethod0’
return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
^~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c: In function ‘__Pyx__ExceptionSave’:
src/lxml/lxml.etree.c:233753:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
*type = tstate->exc_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233754:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233755:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
*tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx__ExceptionReset’:
src/lxml/lxml.etree.c:233762:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233763:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233764:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c:233765:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233766:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233767:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx__GetException’:
src/lxml/lxml.etree.c:233822:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233823:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233824:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c:233825:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = local_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233826:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = local_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233827:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = local_tb;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx__ExceptionSwap’:
src/lxml/lxml.etree.c:234160:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:234161:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:234162:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c:234163:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = *type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:234164:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = *value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:234165:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = *tb;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx_PyList_Pop’:
src/lxml/lxml.etree.c:4532:83: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyList_Type_pop.func’
(PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c:234476:12: note: in expansion of macro ‘__Pyx_CallUnboundCMethod0’
return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyList_Type_pop, L);
^~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c: In function ‘__Pyx_PyDict_Values’:
src/lxml/lxml.etree.c:4532:83: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyDict_Type_values.func’
(PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c:235119:16: note: in expansion of macro ‘__Pyx_CallUnboundCMethod0’
return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
^~~~~~~~~~~~~~~~~~~~~~~~~
Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit15huy_ms.c -o tmp/xmlXPathInit15huy_ms.o
/tmp/xmlXPathInit15huy_ms.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main (int argc, char **argv) {
^~~~
cc tmp/xmlXPathInit15huy_ms.o -lxml2 -o a.out
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Failed building wheel for lxml
Running setup.py clean for lxml
Failed to build lxml

[...]
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/rng
creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl
creating build/lib.linux-x86_64-3.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
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
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
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
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
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
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
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
creating build/temp.linux-x86_64-3.7/src/lxml
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
src/lxml/lxml.etree.c: In function ‘__Pyx_PyCFunction_FastCall’:
src/lxml/lxml.etree.c:233279:13: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth’
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c: In function ‘__Pyx_PyDict_Items’:
src/lxml/lxml.etree.c:4532:83: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyDict_Type_items.func’
(PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c:233529:16: note: in expansion of macro ‘__Pyx_CallUnboundCMethod0’
return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
^~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c: In function ‘__Pyx__ExceptionSave’:
src/lxml/lxml.etree.c:233753:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
*type = tstate->exc_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233754:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233755:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
*tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx__ExceptionReset’:
src/lxml/lxml.etree.c:233762:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233763:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233764:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c:233765:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233766:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233767:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx__GetException’:
src/lxml/lxml.etree.c:233822:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233823:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233824:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c:233825:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = local_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:233826:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = local_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:233827:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = local_tb;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx__ExceptionSwap’:
src/lxml/lxml.etree.c:234160:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tmp_type = tstate->exc_type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:234161:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:234162:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c:234163:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
tstate->exc_type = *type;
^~~~~~~~
curexc_type
src/lxml/lxml.etree.c:234164:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
tstate->exc_value = *value;
^~~~~~~~~
curexc_value
src/lxml/lxml.etree.c:234165:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = *tb;
^~~~~~~~~~~~~
curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx_PyList_Pop’:
src/lxml/lxml.etree.c:4532:83: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyList_Type_pop.func’
(PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c:234476:12: note: in expansion of macro ‘__Pyx_CallUnboundCMethod0’
return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyList_Type_pop, L);
^~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c: In function ‘__Pyx_PyDict_Values’:
src/lxml/lxml.etree.c:4532:83: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyDict_Type_values.func’
(PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c:235119:16: note: in expansion of macro ‘__Pyx_CallUnboundCMethod0’
return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
^~~~~~~~~~~~~~~~~~~~~~~~~
Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit7wtk6co2.c -o tmp/xmlXPathInit7wtk6co2.o
/tmp/xmlXPathInit7wtk6co2.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main (int argc, char **argv) {
^~~~
cc tmp/xmlXPathInit7wtk6co2.o -lxml2 -o a.out
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Rolling back uninstall of lxml
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'))" install --record /tmp/pip-record-fdtp18kj/install-record.txt --single-version-externally-managed --compile --install-headers /home/test7/myweb/env/include/site/python3.7/lxml" failed with error code 1 in /tmp/pip-install-o_pr8d68/lxml/

python 3.7 应该只与 lxml > 4.0 一起使用。我已经尝试过绝望 lxml < 4.0,但没有成功。4.0 < lxml < 4.4.1

哪个版本无所谓

任何帮助感谢如何将 sofort lib 放入我的 virtualenv。

最好的问候

最佳答案

sofort declares dependency lxml >= 3.5, < 4.0所以pip使用最新的合适版本 lxml 3.8。版本比较旧,不提供 Python 3.7 的轮子,only for 2.6-3.6 .可能版本不兼容Python 3.7,无法源码编译。

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

关于pip - lxml 无法使用 python 3.7 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58888794/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com