XMLSEC Python on MacBook m1

2.6k views Asked by At

Installed python lib xmlsec on macbook (M1). When I try to run the .py program with import xmlsec - I get an error:

import xmlsec
ImportError: dlopen(/PycharmProjects/pythonProject2/venv/lib/python3.7/site-packages/xmlsec.cpython-37m-darwin.so, 0x0002): symbol not found in flat namespace '_xmlSecAddIDs

I tried to reinstall, and tried to use terminal by rosetta 2 also, but the result was the same

1

There are 1 answers

0
James Risner On

Use Brew:

brew install libxmlsec1

I created a test python file:

% cat xmlsec.py
def test_init(self):
    ctx = xmlsec.EncryptionContext(manager=xmlsec.KeysManager())
    del ctx

It passed.

For more information, check out the developer discussing the issue.