我试图使用SAML2.0PythonPython-SAML库(https://github.com/onelogin/python-saml)在我的Python2.7的Django(版本1.7)应用程序中实现oneLogin,但我得到以下错误:
import dm.xmlsec.binding as xmlsec
ImportError: No module named dm.xmlsec.binding当我试图在我的机器上安装这个特定的库时,我得到了这个错误:
Collecting dm.xmlsec.binding
Using cached https://files.pythonhosted.org/packages/56/30/7d19e02398b46593c7a72589c767c50f1ff4a96845f5bc6c61c3183fb213/dm.xmlsec.binding-2.0.tar.gz
Complete output from command python setup.py egg_info:
Error: cannot get XMLSec1 pre-processor and compiler flags; do you have the `libxmlsec1` development package installed?
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-W3sKpb/dm.xmlsec.binding/请让我知道我应该使用什么库在python2中实现SAML2。
发布于 2020-01-29 15:05:25
在Installation section中,该包具有一些外部依赖项:
依赖项
基于Python 2.7
对于dm.xmlsec.binding,您需要安装libxmlsec1-dev。
根据您的平台:
$ sudo apt-get install libxmlsec1-dev
$ brew安装libxmlsec1
然后安装依赖项
$ pip install dm.xmlsec.binding
OR
$ python -m pip install dm.xmlsec.binding(请确保将其安装在与应用程序相同的python环境中)
发布于 2020-01-29 14:39:18
打开终端,点击下面的命令
pip install dm.xmlsec.bindinghttps://stackoverflow.com/questions/59961649
复制相似问题