3

I cannot install libxml in my python env to install sofort python: Python 3.7.3 Already did: apt-get --reinstalll install python-dev libxml2-dev libxslt1-dev zlib1g-dev When trying to install libxml it calls an error about PyObject with such errors

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

long output:

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 should only go with lxml > 4.0. I already tried of desperation lxml < 4.0 with expected no success. It does not matter which version of 4.0 < lxml < 4.4.1

Any help appreciated how to get sofort lib into my virtualenv.

best regards

1 Answer 1

6

sofort declares dependency lxml >= 3.5, < 4.0 so pip uses the latest suitable version lxml 3.8. The version is rather old and doesn't provide wheels for Python 3.7, only for 2.6-3.6. Perhaps the version is not compatible with Python 3.7 and cannot be compiled from sources.

Downgrade to Python 3.6. And ping sofort authors to upgrade. Or better send them a pull request.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.