Unfortunately, it's more complicated than that. xmlsec itself depends on libxmlsec1, which is a C library. These can either be compiled to order or pulled as precompiled wheel (whl) files for python based on each operating system.
On Friday, I uploaded precompiled wheels for all the mac + xmlsec + lxml versions I had access to and reuploaded them. Even so, there's is a segfault potential in the xmlsec package on modern mac versions. As such, since 2.266.1, rather than segfaulting, we try multiple times in a subprocess to sign the XML, then if after 10 tries it never works we throw this error.
I recommend pip uninstall xmlsec, then pip install xmlsec --no-cache as your best bet. If you have an alternative that involves a less segfaulty solution on Mac, I'm all ears. This particular bug has been quite the frustrating one on the internet boards.