Chaffelson / nipyapi

A convenient Python wrapper for Apache NiFi
Other
244 stars 76 forks source link

Cannot install nipyapi on WSL 2 running Ubuntu #259

Closed peterzandbergen closed 3 years ago

peterzandbergen commented 3 years ago

Description

I try to install nipyapi on the WSL 2 Ubuntu environment.

What I Did

Command: pip3 install nipyapi

Output (error part):

Building wheels for collected packages: future, lxml
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491058 sha256=3f5a408c33fcd2539d9a4395c59548bc22dad8818baa37a8b96b9c07a71b5fe9
  Stored in directory: /root/.cache/pip/wheels/8e/70/28/3d6ccd6e315f65f245da085482a2e1c7d14b90b30f239e2cf4
  Building wheel for lxml (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l2yokikr/lxml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l2yokikr/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-8n4i3wji
       cwd: /tmp/pip-install-l2yokikr/lxml/
  Complete output (96 lines):
  Building lxml version 4.3.5.
  Building without Cython.
  ERROR: b'/bin/sh: 1: xslt-config: not found\n'
  ** make sure the development packages of libxml2 and libxslt are installed **

  Using build configuration of libxslt
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/sax.py -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/builder.py -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.8/lxml
  creating build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.8/lxml/includes
  creating build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.8/lxml/html
  copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.8/lxml/html
  creating build/lib.linux-x86_64-3.8/lxml/isoschematron
  copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.8/lxml/isoschematron
  copying src/lxml/etree.h -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/etree_api.h -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.8/lxml
  copying src/lxml/includes/__init__.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.8/lxml/includes
  copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.8/lxml/includes
  creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources
  creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/rng
  copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/rng
  creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl
  copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl
  copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl
  creating build/lib.linux-x86_64-3.8/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.8/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.8/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.8/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.8/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.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  running build_ext
  building 'lxml.etree' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/src
  creating build/temp.linux-x86_64-3.8/src/lxml
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/include/python3.8 -c src/lxml/etree.c -o build/temp.linux-x86_64-3.8/src/lxml/etree.o -w
  In file included from src/lxml/etree.c:692:
  src/lxml/includes/etree_defs.h:14:10: fatal error: libxml/xmlversion.h: No such file or directory
     14 | #include "libxml/xmlversion.h"
        |          ^~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  creating tmp
  cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitq9p001uj.c -o tmp/xmlXPathInitq9p001uj.o
  /tmp/xmlXPathInitq9p001uj.c:1:10: fatal error: libxml/xpath.h: No such file or directory
      1 | #include "libxml/xpath.h"
        |          ^~~~~~~~~~~~~~~~
  compilation terminated.
  *********************************************************************************
  Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
  *********************************************************************************
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for lxml
  Running setup.py clean for lxml
Successfully built future
Failed to build lxml
Installing collected packages: websocket-client, docker, ruamel.yaml.clib, ruamel.yaml, future, lxml, pyparsing, packaging, nipyapi
    Running setup.py install for lxml ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l2yokikr/lxml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l2yokikr/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-56m3rkln/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/lxml
         cwd: /tmp/pip-install-l2yokikr/lxml/
    Complete output (95 lines):
    Building lxml version 4.3.5.
    Building without Cython.
    ERROR: b'/bin/sh: 1: xslt-config: not found\n'
    ** make sure the development packages of libxml2 and libxslt are installed **

    Using build configuration of libxslt
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/sax.py -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/builder.py -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.8/lxml
    creating build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.8/lxml/includes
    creating build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.8/lxml/html
    copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.8/lxml/html
    creating build/lib.linux-x86_64-3.8/lxml/isoschematron
    copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.8/lxml/isoschematron
    copying src/lxml/etree.h -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/etree_api.h -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.8/lxml
    copying src/lxml/includes/__init__.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.8/lxml/includes
    copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.8/lxml/includes
    creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources
    creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/rng
    copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/rng
    creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl
    creating build/lib.linux-x86_64-3.8/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.8/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.8/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.8/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.8/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.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/src
    creating build/temp.linux-x86_64-3.8/src/lxml
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/include/python3.8 -c src/lxml/etree.c -o build/temp.linux-x86_64-3.8/src/lxml/etree.o -w
    In file included from src/lxml/etree.c:692:
    src/lxml/includes/etree_defs.h:14:10: fatal error: libxml/xmlversion.h: No such file or directory
       14 | #include "libxml/xmlversion.h"
          |          ^~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    cc -I/usr/include/libxml2 -c /tmp/xmlXPathInit_4ng79x5.c -o tmp/xmlXPathInit_4ng79x5.o
    /tmp/xmlXPathInit_4ng79x5.c:1:10: fatal error: libxml/xpath.h: No such file or directory
        1 | #include "libxml/xpath.h"
          |          ^~~~~~~~~~~~~~~~
    compilation terminated.
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *********************************************************************************
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l2yokikr/lxml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l2yokikr/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-56m3rkln/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/lxml Check the logs for full command output.

Urgency

We want to use the NiFi api to control and monitor our NiFi server instances.

peterzandbergen commented 3 years ago

Noobie me: installed the libxml2-dev and libxslt-dev packages and now it seems to run.

Chaffelson commented 3 years ago

Good self diagnosis :)

On Wed, 3 Feb 2021, 16:22 Peter Zandbergen, notifications@github.com wrote:

Closed #259 https://github.com/Chaffelson/nipyapi/issues/259.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Chaffelson/nipyapi/issues/259#event-4286230616, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZAZOAPNUFYQCXM22VRR5LS5FZ45ANCNFSM4XBEFD7A .

peterzandbergen commented 3 years ago

Thanks,

I probably need to work on my Python skills to get them at the same level as my Go skills.

Peter Zandbergen Tel: +31 6 460 55 872

linkedIn: peterzandbergen https://www.linkedin.com/in/peterzandbergen

On Wed, 3 Feb 2021 at 18:37, Dan Chaffelson notifications@github.com wrote:

Good self diagnosis :)

On Wed, 3 Feb 2021, 16:22 Peter Zandbergen, notifications@github.com wrote:

Closed #259 https://github.com/Chaffelson/nipyapi/issues/259.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Chaffelson/nipyapi/issues/259#event-4286230616, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACZAZOAPNUFYQCXM22VRR5LS5FZ45ANCNFSM4XBEFD7A

.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Chaffelson/nipyapi/issues/259#issuecomment-772689815, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGZPLWLDGV2EOLLDZYX723S5GCVJANCNFSM4XBEFD7A .