我无法在Python 2.7.7中使用OSX 10.10.3 Yosemite在Mac上安装LXML。
我运行魔法命令:
STATIC_DEPS=true sudo pip install lxml
但是当我导入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
也报告了类似的问题
我没有运气。我试图重新安装所有东西,但它总是告诉我
Requirement already satisfied (use --upgrade to upgrade): lxml in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Cleaning up...
我不知道如何解决这个问题,任何人都可以帮助我吗?