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'
Run Code Online (Sandbox Code Playgroud)
我不知道如何解决这个问题。我也尝试安装其他 xmlsec 包,但没有任何效果。
Sat*_*hia 22
此处列出了 Xmlsec https://pypi.org/project/xmlsec/。应安装以下命令以下载所需的本机库。
sudo apt-get install pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl
Run Code Online (Sandbox Code Playgroud)
Ric*_*rdo 12
快进到 2023 年,这个问题发生在 macOS 上。自brew version 4.0.13 以来,我们似乎无法 (pip install xmlsec) 。dpritchett的解决方法的变体加上johnnymetz的评论救了我,其中包括:
手动恢复到最后一次已知的 1.3.0 之前的良好 xmlsec1 版本 (1.2.37) 的副本 公式:
brew edit libxmlsec1; 将打开一个编辑器,其中包含最新下载的 xmlsec 公式的内容- 粘贴最后一个 1.3.0 之前版本的冲泡配方内容 并保存 (vim:
wq!)*brew unlink libxmlsec1- 安装本地公式:
brew install /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/libxmlsec1.rbpip install xmlsec
* 在我的设置中,步骤 1 和 2 不是必需的;我在同一链接上粘贴了他们答案的变体
我在安装 xmlsec 时遇到了类似的问题。对我来说,重新安装此处列出的所需本机库:https://pypi.org/project/xmlsec/
就像安装一样简单:brew install libxml2 libxmlsec1 pkg-config