xmlsec的构建轮失败-Mac

时间:2018-09-18 04:20:33

标签: python macos pip virtualenv homebrew

我要在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。

我几乎完成了在Google搜索结果中可以找到的所有内容...但是无法实现预期的目标

这是我的 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

谢谢。

3 个答案:

答案 0 :(得分:2)

在Mac中检查Libxmlsec1和pkg-config软件包

brew install Libxmlsec1
brew install pkg-config
pip install xmlsec

答案 1 :(得分:0)

我遇到了此错误(尽管在python 2.7上),brew install Libxmlsec1修复了该错误。

答案 2 :(得分:0)

我需要:

brew install pkg-config