Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libxml2 ImportError when importing etree from lxml

I am trying to run python-docx in Enthought Canopy. I'm running Ubuntu 14.04 on VMWare Worstation 10. Whenever I try to import docx or import etree from lxml, I get an error that seems to be related to the libxml2 library:

ImportError: /usr/lib/x86_64-linux-gnu/libxslt.so.1: symbol xmlBufUse, version   LIBXML2_2.9.0 not defined in file libxml2.so.2 with link time reference

I checked around, and found another person with a similar error, and I followed the directions. Still no luck. Then I realized that I have libxml2 version 2.9.1 on my computer.

Does this mean that I need to get the older 2.9.0 version of libxml2, or is something else going on? I can find 2.9.1 with apt-get, but not 2.9.0. Before setting off on that path, I figured someone here might have a better idea.

Thanks!

like image 636
ScottYoung Avatar asked Jul 11 '14 01:07

ScottYoung


1 Answers

Just install below package.

For Ubuntu

apt-get install libxslt-dev

For Centos

yum install libxslt-devel
like image 181
Marthanda Anand Avatar answered Nov 05 '22 12:11

Marthanda Anand