Skip to content

pip install basyx-python-sdk fails to build wheel for lxml #391

@zrgt

Description

@zrgt

While trying to install a Python package (e.g., basyx-python-sdk), the installation fails due to an error building the lxml dependency. This appears to be related to lxml itself and not pip.

Environment:

  • OS: Windows 10
  • Python version: 3.13
  • Pip version: 25.0.1
  • Command used: pip install basyx-python-sdk

Error Output:

Building wheels for collected packages: lxml
  Building wheel for lxml (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for lxml (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [126 lines of output]
      <string>:67: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
      C:\Users\SOME_USER\AppData\Local\Temp\pip-build-env-ouymdgg9\overlay\Lib\site-packages\setuptools\dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: BSD License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      Building lxml version 4.9.4.
      Building without Cython.
      Building against pre-built libxml2 andl libxslt libraries
      running bdist_wheel
      running build
      running build_py
      creating build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\builder.py -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\cssselect.py -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\doctestcompare.py -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\ElementInclude.py -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\sax.py -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\usedoctest.py -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\_elementpath.py -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\__init__.py -> build\lib.win-amd64-cpython-313\lxml
      creating build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\__init__.py -> build\lib.win-amd64-cpython-313\lxml\includes
      creating build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\builder.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\clean.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\defs.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\diff.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\formfill.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\html5parser.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\soupparser.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-cpython-313\lxml\html
      copying src\lxml\html\__init__.py -> build\lib.win-amd64-cpython-313\lxml\html
      creating build\lib.win-amd64-cpython-313\lxml\isoschematron
      copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-cpython-313\lxml\isoschematron
      copying src\lxml\etree.h -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\etree_api.h -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\lxml.etree.h -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\etree.pyx -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\objectify.pyx -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\apihelpers.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\classlookup.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\cleanup.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\debug.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\docloader.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\dtd.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\extensions.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\iterparse.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\nsclasses.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\objectpath.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\parser.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\parsertarget.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\proxy.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\public-api.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\readonlytree.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\relaxng.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\saxparser.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\schematron.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\serializer.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\xinclude.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\xmlerror.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\xmlid.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\xmlschema.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\xpath.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\xslt.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\xsltext.pxi -> build\lib.win-amd64-cpython-313\lxml
      copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\config.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\__init__.pxd -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-cpython-313\lxml\includes
      copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-cpython-313\lxml\includes
      creating build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\rng
      copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\rng
      creating build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl
      copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl
      copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl
      creating build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
      copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-cpython-313\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
      running build_ext
      building 'lxml.etree' extension
      creating build\temp.win-amd64-cpython-313\Release\src\lxml
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes -IC:\Users\igor\
PycharmProjects\pdf2handover-documentation-py\.venv\include "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.1008.0_x64__qbz5n2kfra8p0\include" "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Py
thon.3.13_3.13.1008.0_x64__qbz5n2kfra8p0\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MS
VC\14.36.32532\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kit
s\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /Tcsrc\lxml\etree.c /Fobuild\temp.win-amd64-cpython-313\Release\src\lxml\etree.obj -w
      cl : Befehlszeile warning D9025 : "/W3" wird durch "/w" \x81berschrieben
      etree.c
      C:\Users\SOME_USER\AppData\Local\Temp\pip-install-wtkowtdx\lxml_2792fcba95624c2ebe906312abe22cfd\src\lxml\includes/etree_defs.h(14): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "libxml/xmlversion.h": No such file or directory
      Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      creating Users\SOME_USER\AppData\Local\Temp
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files (x86)\Microsoft Visual Studio
      xmlXPathInitqqd_a_cr.c
      C:\Users\SOME_USER\AppData\Local\Temp\xmlXPathInitqqd_a_cr.c(1): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "libxml/xpath.h": No such file or directory
      *********************************************************************************
      Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
      *********************************************************************************
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

Steps to Reproduce:

  1. Run pip install basyx-python-sdk
  2. Observe error during lxml installation

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsdkSomething to do with the `sdk` package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions