无法使用PIP命令安装xmlsec

时间:2020-09-12 11:24:27

标签: python pip xmlsec

pip install xmlsec命令将引发以下错误。

ERROR: Command errored out with exit status 1:
   command: /home/xxx/PycharmProjects/saml_impl/saml_impl/venv/bin/python /home/sathia/PycharmProjects/saml_impl/saml_impl/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpu_b5m5vz
       cwd: /tmp/pip-install-gblz98sr/xmlsec
  Complete output (14 lines):
  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.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/xmlsec
  copying src/xmlsec/py.typed -> build/lib.linux-x86_64-3.8/xmlsec
  copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-3.8/xmlsec
  copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-3.8/xmlsec
  copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-3.8/xmlsec
  copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-3.8/xmlsec
  running build_ext
  error: Unable to invoke pkg-config.
  ----------------------------------------
  ERROR: Failed building wheel for xmlsec
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec which use PEP 517 and cannot be installed directly'

我不知道如何解决此问题。我也尝试安装其他xmlsec软件包,没有任何效果。

4 个答案:

答案 0 :(得分:1)

我找到了解决方法,

在日志本身中提到了pkg-config的问题。我已经安装了以下命令

sudo apt-get install -y pkg-config

现在问题已解决。

答案 1 :(得分:1)

我有类似的问题,但不是“ pkg-config” 错误,而是“ xmlsec1” 错误,所以我使用了命令

sudo apt-get install libxmlsec1-dev pkg-config

按照Could not find xmlsec1 config. Are libxmlsec1-dev and pkg-config installed?

答案 2 :(得分:0)

这表明PEP 517不支持您要安装的车轮。 尝试升级以下软件包,然后尝试重新安装

WindowGroup {
    …
}
.commands { 
    CommandGroup(after: .systemServices) { 
        Button(action: {}) { Text("hi") } 
    }
}

答案 3 :(得分:0)

我在安装 xmlsec 时遇到了类似的问题。对我来说是重新安装此处列出的所需本机库:https://pypi.org/project/xmlsec/

就像安装一样简单:brew install libxml2 libxmlsec1 pkg-config