Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lxml runtime error: Reason: Incompatible library version: etree.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0

I have a perplexing problem. I have used mac version 10.9, anaconda 3.4.1, python 2.7.6.

Developing web application with python-amazon-product-api. i have overcome an obstacle about installing lxml, referencing clang error: unknown argument: '-mno-fused-madd' (python package installation failure).

but another runtime error happened. Here is the output from webbrowser.

Exception Type: ImportError Exception Value:     dlopen(/Users/User_Name/Documents/App_Name/lib/python2.7/site-packages/lxml/etree.so, 2): Library not loaded: libxml2.2.dylib Referenced from: /Users/User_Name/Documents/App_Name/lib/python2.7/site-packages/lxml/etree.so Reason: Incompatible library version: etree.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0 

Not sure how to proceed and have searched here and elsewhere for this particular error. Any help is much appreciated!

like image 688
BlueFrog Avatar asked Apr 19 '14 16:04

BlueFrog


2 Answers

This worked for me:

brew install libxml2 brew install libxslt brew link libxml2 --force brew link libxslt --force 
like image 131
jessems Avatar answered Sep 28 '22 02:09

jessems


If using conda, force a reinstall of lxml:

$ conda install -f lxml

Note that forcing a reinstall may have unforeseen consequences.

I first tried conda update lxml to no effect.

Then tried conda install lxml also to no effect (but that was a while ago and ymmv -- see comment).

like image 37
scharfmn Avatar answered Sep 28 '22 02:09

scharfmn