8

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

6 回答 6

7

Xmlsec 在此处列出https://pypi.org/project/xmlsec/以了解需要安装哪些本机库。

sudo apt-get install pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl
于 2020-09-12T12:02:33.967 回答
6

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

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

于 2021-01-08T18:25:38.747 回答
2

这表明 PEP 517 不支持您尝试安装的轮子。请尝试升级以下软件包,然后再次尝试安装

pip install --upgrade pip setuptools wheel
于 2020-09-12T11:34:05.253 回答
1

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

sudo apt-get install libxmlsec1-dev pkg-config

根据找不到 xmlsec1 配置。是否安装了 libxmlsec1-dev 和 pkg-config?

于 2020-10-06T13:27:24.877 回答
1
sudo apt-get install libxmlsec1-dev pkg-config

这将适用于 ubuntu / wsl ubuntu

于 2021-08-23T09:28:02.430 回答
0
yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
于 2021-10-03T16:32:37.953 回答