The xmlsec docs suggest that pip install xmlsec
should work right out of the box
Starting with 1.3.7, prebuilt wheels are available for Windows, so running pip install xmlsec should suffice.
However, this threw an error (see below).
I found this question, and I think the answers suggest I need to add native libraries pre-install. But since I'm on Windows and a bit of a beginner I don't know how to install packages like libxml2-dev, libxmlsec1-dev, or libxmlsec1-openssl. pip install libxml2-dev
doesn't work and AFAIK I can't install brew
on Windows. I have searched SO and Google extensively and just can't figure it out.
I also tried installing libxml2 separately by extracting some files from the bin folder and adding it to PATH as described here: https://pages.lip6.fr/Jean-Francois.Perrot/XML-Int/Session1/WinLibxml.html, but that didn't work either.
Building wheels for collected packages: xmlsec
Building wheel for xmlsec (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for xmlsec (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [62 lines of output]
running bdist_wheel
running build
running build_py
package init file 'src\xmlsec\__init__.py' not found (or not a regular file)
running build_ext
building 'xmlsec' extension
constants.c
...LOTS OF ERRORS/WARNINGS...
fatal error C1047: The object or library file 'C:\Users\12345\AppData\Local\Temp\pip-install-3tfgg6bc\xmlsec_12345\build\tmp\libs\iconv-1.14.win64\lib\iconv_a.lib' was created with an older compiler than other objects; rebuild old objects and libraries
LINK : fatal error LNK1257: code generation failed
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe' failed with exit code 1257
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for xmlsec
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec, which is required to install pyproject.toml-based projects`