使用OSX 10.10 Yosemite在Mac上安装LXML for Python时出错

时间:2015-04-23 17:53:31

标签: python lxml

我无法在Python 2.7.7中使用OSX 10.10.3 Yosemite在Mac上安装LXML。

我运行魔法命令:

STATIC_DEPS=true sudo pip install lxml

建议herehere

但是当我导入lxml.html时出现此错误:

Traceback (most recent call last):
  File "<pyshell#22>", line 1, in <module>
    import lxml.html
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/html/__init__.py", line 42, in <module>
    from lxml import etree
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so, 2): Symbol not found: _exsltDateXpathCtxtRegister
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so
  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so

其他问题thisthis

也报告了类似的问题

我没有运气。我试图重新安装所有东西,但它总是告诉我

Requirement already satisfied (use --upgrade to upgrade): lxml in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Cleaning up...

我不知道如何解决这个问题,任何人都可以帮助我吗?

0 个答案:

没有答案