Comment 4 for bug 1902364

Revision history for this message
Andreas Maier (maiera) wrote :

With "released wheel" are you referring to a Python package or to an OS-level package that contains the wheel archive?

On Pypi, I found 'libxml2-python3', and installing that fails due to missing headers (on Python 3.9.0 on macOS):

$ pip install libxml2-python3
Collecting libxml2-python3
  Downloading libxml2-python3-2.9.5.tar.gz (216 kB)
     |████████████████████████████████| 216 kB 2.9 MB/s
    ERROR: Command errored out with exit status 1:
     command: /Users/maiera/virtualenvs/pywbem39/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/lh/v0_07k9d7dbfqdytfzzxks3r0000gn/T/pip-install-koagvkuh/libxml2-python3/setup.py'"'"'; __file__='"'"'/private/var/folders/lh/v0_07k9d7dbfqdytfzzxks3r0000gn/T/pip-install-koagvkuh/libxml2-python3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/lh/v0_07k9d7dbfqdytfzzxks3r0000gn/T/pip-pip-egg-info-0068v7va
         cwd: /private/var/folders/lh/v0_07k9d7dbfqdytfzzxks3r0000gn/T/pip-install-koagvkuh/libxml2-python3/
    Complete output (1 lines):
    failed to find headers for libxml2: update includes_dir
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I do have the headers installed as part of the OS-level "libxml2" package.

$ brew list libxml2
/usr/local/Cellar/libxml2/2.9.10_2/bin/xml2-config
/usr/local/Cellar/libxml2/2.9.10_2/bin/xmlcatalog
/usr/local/Cellar/libxml2/2.9.10_2/bin/xmllint
/usr/local/Cellar/libxml2/2.9.10_2/include/libxml2/ (47 files)
/usr/local/Cellar/libxml2/2.9.10_2/lib/libxml2.2.dylib
/usr/local/Cellar/libxml2/2.9.10_2/lib/cmake/libxml2/libxml2-config.cmake
/usr/local/Cellar/libxml2/2.9.10_2/lib/pkgconfig/libxml-2.0.pc
/usr/local/Cellar/libxml2/2.9.10_2/lib/python3.9/ (4 files)
/usr/local/Cellar/libxml2/2.9.10_2/lib/ (3 other files)
/usr/local/Cellar/libxml2/2.9.10_2/share/aclocal/libxml.m4
/usr/local/Cellar/libxml2/2.9.10_2/share/doc/ (152 files)
/usr/local/Cellar/libxml2/2.9.10_2/share/gtk-doc/ (55 files)
/usr/local/Cellar/libxml2/2.9.10_2/share/man/ (4 files)

What do I need to do to make the obviously installed header files known to the installation?

BTW, brew reports version 2.9.10 of libxml2 while in Python, lxml.etree.LIBXML_VERSION and lxml.etree.LIBXML_COMPILED_VERSION both report 2.9.4:

$ brew info libxml2
libxml2: stable 2.9.10 (bottled), HEAD [keg-only]