xmlsec构建wheel失败 - mac

19
我正在将我的Mac安装在Python虚拟环境中。每当我运行“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/

我已经完成了以下操作:

  • 重新安装/更新我的xcode命令行工具
  • 尝试使用homebrew安装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

谢谢你。

感谢您。


找不到xmlsec1配置。是否已安装xmlsec1?它是否在$PATH中?如果没有,请将其目录添加到$PATH并重新运行pip install xmlsec - phd
5个回答

28

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

brew install Libxmlsec1
brew install pkg-config
pip install xmlsec

5
我遇到了这个错误(尽管是在Python 2.7上),brew install Libxmlsec1解决了它。

1
我想指出的是,在使用该命令之前,您可能需要安装 homebrew : https://brew.sh/ 。 - miike3459

4
在Debian上,如果有人从Google搜索进入此处,则需要安装libxmlsec1-devxmlsec1libxmlsec1不足以满足要求。

2

我使用的是macOS Catalina操作系统,需要使用brew install安装该软件,然后它就可以正常工作了。

brew install openssl xmlsec1

在这个问题的最后一条评论中找到了相关信息。


1
我需要:

brew install pkg-config


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接