【问题标题】:Failed building wheel for xmlsec - macxmlsec 的构建轮失败 - mac
【发布时间】:2019-02-22 00:52:27
【问题描述】:

我正在 python virtualenv 环境中安装我的 mac。每当我安装需求包命令“pip install -r requirements.txt”时,我都会收到此消息。

pip install -r requirements.txt ----------------------------------------
Failed building wheel for xmlsec
Running setup.py clean for xmlsec
Failed to build xmlsec
Installing collected packages: xmlsec, python3-saml, raven, scrypt, social-auth-app-django, social-auth-steemconnect, w3lib, voluptuous, ujson, toolz, steem
Running setup.py install for xmlsec ... error
Complete output from command 
/Users/leebom/Documents/workspace/lineup/backend/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p5/385n2cr95sq16x17334vsbnr0000gq/T/pip-install-xn4yfy51/xmlsec/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/p5/385n2cr95sq16x17334vsbnr0000gq/T/pip-record-kpdy8vo4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/leebom/Documents/workspace/lineup/backend/venv/bin/../include/site/python3.6/xmlsec:
running install
running build
running build_ext
************************************************************************
Could not find xmlsec1 config. Are libxmlsec1-dev and pkg-config installed?

Perhaps try: xcode-select --install
************************************************************************
Command "/Users/leebom/Documents/workspace/lineup/backend/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p5/385n2cr95sq16x17334vsbnr0000gq/T/pip-install-xn4yfy51/xmlsec/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/p5/385n2cr95sq16x17334vsbnr0000gq/T/pip-record-kpdy8vo4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/leebom/Documents/workspace/lineup/backend/venv/bin/../include/site/python3.6/xmlsec" failed with error code 1 in /private/var/folders/p5/385n2cr95sq16x17334vsbnr0000gq/T/pip-install-xn4yfy51/xmlsec/

我已经做了以下事情:

  • 重新安装/更新我的 xocde 命令行工具
  • 尝试自制 xmlsec 包 - 结果消息是它已经安装。
  • 还安装了 pkg-config、libxmlsec1-dev。

我几乎已经完成了在谷歌搜索结果中可以找到的所有内容......但无法完成预期

这是我的 requirements.txt

appdirs==1.4.3
asn1crypto==0.24.0
attrs==17.4.0
awscli==1.15.81
boto==2.49.0
botocore==1.10.80
certifi==2018.1.18
cffi==1.11.5
chardet==3.0.4
colorama==0.3.9
cryptography==2.2.2
defusedxml==0.5.0
Django==2.0.3
django-cors-headers==2.2.0
django-filter==1.1.0
django-mysql==2.2.0
django-ratelimit==1.1.0
django-storages==1.6.6
django-test-plus==1.0.22
djangorestframework==3.8.2
docutils==0.14
dry-rest-permissions==0.1.10
ecdsa==0.13
funcy==1.10.1
future==0.16.0
futures==3.1.1
gunicorn==19.8.1
idna==2.6
isodate==0.6.0
jmespath==0.9.3
langdetect==1.0.7
lxml==4.2.1
more-itertools==4.1.0
mysqlclient==1.3.12
oauthlib==2.1.0
Pillow==5.1.0
pkgconfig==1.3.1
pluggy==0.6.0
prettytable==0.7.2
py==1.5.3
pyasn1==0.4.4
pycparser==2.18
pycrypto==2.6.1
pycryptodomex==3.6.1
pyjwkest==1.4.0
PyJWT==1.6.4
pylibscrypt==1.7.1
pytest==3.5.0
pytest-django==3.1.2
python-dateutil==2.7.3
python-social-auth==0.3.6
python3-openid==3.1.0
python3-saml==1.4.1
pytz==2018.3
PyYAML==3.13
raven==6.9.0
requests==2.18.4
requests-oauthlib==0.8.0
rsa==3.4.2
s3transfer==0.1.13
scrypt==0.8.6
six==1.11.0
social-auth-app-django==2.1.0
social-auth-core==1.7.0
social-auth-steemconnect==0.0.2
steem==1.0.0
toolz==0.9.0
ujson==1.35
urllib3==1.22
voluptuous==0.11.1
w3lib==1.19.0
xmlsec==1.3.3

谢谢。

【问题讨论】:

  • 找不到 xmlsec1 配置。 xmlsec1 安装了吗?是在$PATH 吗?如果没有 - 将其目录添加到 $PATH 并重新运行 pip install xmlsec

标签: python macos pip virtualenv homebrew


【解决方案1】:

在你的 Mac 中检查 Libxmlsec1 和 pkg-config 包

brew install Libxmlsec1
brew install pkg-config
pip install xmlsec

【讨论】:

    【解决方案2】:

    我遇到了这个错误(虽然在 Python 2.7 上),brew install Libxmlsec1 修复了它。

    【讨论】:

    • 我想指出,您可能必须在使用该命令之前安装homebrewbrew.sh
    【解决方案3】:

    在 Debian 上,您需要 libxmlsec1-dev,以防有人通过 Google 搜索来到这里。 xmlsec1libxmlsec1 是不够的。

    【讨论】:

      【解决方案4】:

      我需要:

      brew install pkg-config

      【讨论】:

        【解决方案5】:

        我在 macOS Catalina 上,需要 brew 安装它,然后它就可以工作了

        brew install openssl xmlsec1
        

        找到了这个issue最后一条评论的信息。

        【讨论】:

          猜你喜欢
          • 2015-10-11
          • 1970-01-01
          • 2022-12-06
          • 1970-01-01
          • 2020-06-11
          • 2018-01-07
          • 2017-03-17
          • 2020-11-09
          • 2018-05-31
          相关资源
          最近更新 更多