首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法为Mac安装xmlsec

无法为Mac安装xmlsec
EN

Stack Overflow用户
提问于 2022-03-16 08:16:09
回答 1查看 542关注 0票数 0

我对django很陌生。我正在尝试实现python3-saml,它需要Xmlsec。我试图在我的病毒环境中使用“”来安装它。但是抛出这个错误。

代码语言:javascript
复制
    Collecting xmlsec
    Using cached xmlsec-1.3.12.tar.gz (64 kB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Installing backend dependencies ... done
    Preparing metadata (pyproject.toml) ... done
    Requirement already satisfied: lxml>=3.8 in 
    /opt/anaconda3/envs/conda_saml_env/lib/python3.10/site-packages (from xmlsec) 
    (4.8.0)
    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
    ╰─> [14 lines of output]
  running bdist_wheel
  running build
  running build_py
  package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
  creating build
  creating build/lib.macosx-10.9-x86_64-3.10
  creating build/lib.macosx-10.9-x86_64-3.10/xmlsec
  copying src/xmlsec/py.typed -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
  copying src/xmlsec/tree.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
  copying src/xmlsec/__init__.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
  copying src/xmlsec/constants.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
  copying src/xmlsec/template.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
  running build_ext
  error: xmlsec1 is not installed or not in path.
  [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

我尝试了以下方法

  1. brew安装libxml2 libxmlsec1 pkg-config

上述命令的输出是

代码语言:javascript
复制
Warning: libxml2 2.9.12 is already installed and up-to-date.
To reinstall 2.9.12, run:
   brew reinstall libxml2
Warning: libxmlsec1 1.2.33 is already installed and up-to-date.
To reinstall 1.2.33, run:
   brew reinstall libxmlsec1
Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
To reinstall 0.29.2_3, run:
   brew reinstall pkg-config

当我在Linux操作系统上尝试时,我也遇到了同样的问题。然后我可以通过运行以下命令来解决这个问题

代码语言:javascript
复制
sudo apt-get install libxmlsec1-dev

但是我不能在我的Mac上运行这个命令。我遗漏了什么吗。

EN

回答 1

Stack Overflow用户

发布于 2022-03-23 16:29:59

使用以下命令:

代码语言:javascript
复制
xcode-select --install
brew upgrade
brew install libxml2 libxmlsec1
pip install xmlsec
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71493648

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档