<h3>更新</h3>
<p>从1.3.7版开始,针对Windows的<code>xmlsec</code>的预构建控制盘就发布在PyPI上,因此您不应该再遇到这个问题</p>
<h3>原始答案</h3>
<p>我重建了<code>xmlsec</code>个windows控制盘,并将它们上载到<a href="https://github.com/hoefling/xmlsec/releases/tag/1.3.6.post1" rel="nofollow noreferrer">releases page of my fork</a>。要安装,首先安装<code>xmlsec</code>,并传递附加的PyPI索引:</p>
<pre><code>$ pip install xmlsec extra-index-url=https://hoefling.io/pypi
</code></pre>
<p>添加的索引只是代理Github版本的安装请求</p>
<p>现在安装<code>python3-saml</code>:</p>
<pre><code>$ pip install python3-saml
</code></pre>
<h3>(可选)手动选择dist</h3>
<p>您可以从<a href="https://github.com/hoefling/xmlsec/releases/tag/1.3.6.post1" rel="nofollow noreferrer">releases page</a>中手动找到与Python安装相匹配的控制盘,并使用直接链接进行安装,例如</p>
<pre><code>$ python -c "from pip._internal.pep425tags import get_supported; print(*get_supported()[0], sep='-')"
cp37-cp37m-win_amd64
# the matching wheel is thus xmlsec-1.3.6.post1-cp37-cp37m-win_amd64.whl
$ pip install https://github.com/hoefling/xmlsec/releases/download/1.3.6.post1/xmlsec-1.3.6.post1-cp37-cp37m-win_amd64.whl
</code></pre>
<h3>(可选)通过调用tests</h3>
<p>我已经对所有构建的控制盘执行了测试(请检查<a href="https://ci.appveyor.com/project/hoefling/python-xmlsec/builds/32450891" rel="nofollow noreferrer">this job log on Appveyor</a>),但您也可以在本地运行测试以验证<code>xmlsec</code>安装是否正常:</p>
<pre><code>$ git clone https://github.com/mehcode/python-xmlsec.git && cd python-xmlsec
$ pip install pytest
$ pytest tests/
</code></pre>