I'm trying to use pysaml2 to integrate AWS's SSO into my flask application, pysaml2 requires xmlsec, but I'm having trouble installing it.
Here the error im getting:
pip install xmlsec
Collecting xmlsec
Using cached xmlsec-1.3.13.tar.gz (64 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: lxml>=3.8 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from xmlsec) (4.9.3)
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
╰─> [13 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-311
creating build/lib.macosx-10.9-universal2-cpython-311/xmlsec
copying src/xmlsec/py.typed -> build/lib.macosx-10.9-universal2-cpython-311/xmlsec
copying src/xmlsec/tree.pyi -> build/lib.macosx-10.9-universal2-cpython-311/xmlsec
copying src/xmlsec/__init__.pyi -> build/lib.macosx-10.9-universal2-cpython-311/xmlsec
copying src/xmlsec/constants.pyi -> build/lib.macosx-10.9-universal2-cpython-311/xmlsec
copying src/xmlsec/template.pyi -> build/lib.macosx-10.9-universal2-cpython-311/xmlsec
running build_ext
error: Unable to invoke pkg-config.
[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
I have installed homebrew and installed libxml2, libxmlsec1, and pkg-config. However the issue is still there. Does anyone know a solution?
I've also tried solutions from other stack overflow questions, but they did not entirely match my case, and they did not work.