smikesh smikesh - 3 months ago 27
Python Question

Python3, lxml and "Symbol not found: _lzma_auto_decoder" on Mac OS X 10.9

I have installed python 3 using homebrew and afterwards installed pip3 and lxml.

The following line




from lxml import entree




leads to the following error:

$ python3
Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 01:12:57)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site- packages/lxml/etree.so, 2): Symbol not found: _lzma_auto_decoder
Referenced from: /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/lxml/etree.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/lxml/etree.so
>>> exit();


Does anybody know how to fix this?

Answer

I have deleted all versions of python from

      /Library/Frameworks/Python.framework/Versions/

afterwards I have reinstalled python 3 using brew and recreated the symlinks using

     brew link --overwrite python3
Comments