ImportError After Install of lxml on OS X 10.6.8

↘锁芯ラ 提交于 2019-12-25 11:51:25

问题


I tried installing lxml on OS X 10.6.8 by:

  1. Downloading the source from PyPi
  2. sudo python setup.py build --static-deps
  3. sudo python setup.py install

It installed fine, without any errors. And when I go to into the Python REPL I get the following:

Nabs$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 14:13:39) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>> import lxml.html
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml-2.3.3-py2.7-macosx-10.3-fat.egg/lxml/html/__init__.py", line 12, in <module>
    from lxml import etree
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml-2.3.3-py2.7-macosx-10.3-fat.egg/lxml/etree.so, 2): Symbol not found: _xsltLibxsltVersion
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml-2.3.3-py2.7-macosx-10.3-fat.egg/lxml/etree.so
  Expected in: dynamic lookup

来源:https://stackoverflow.com/questions/9501894/importerror-after-install-of-lxml-on-os-x-10-6-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!