xsl-list
[Top] [All Lists]

Re: [xsl] ImportError when importing etree from lxml

2014-07-14 15:38:33
Thanks for the info!  When I run xlstproc --version, I get

Using libxml 20901, libxslt 10128 and libexslt 817
xsltproc was compiled against libxml 20901, libxslt 10128 and libexslt 817
libxslt 10128 was compiled against libxml 20901
libexslt 817 was compiled against libxml 20901

I'm guessing that 20901 means 2.9.1.  Is that correct?  If so, it appears
to match the version of libxml2 that I have installed.

One additional thing: I have tried running xsltproc and xmllint on simple
examples, and they both seem to run okay.  I just get the problem when
importing etree from lxml.

Please let me know your thoughts based on this info.




On Mon, Jul 14, 2014 at 1:11 PM, Carlos Araya 
carlos(_dot_)araya(_at_)gmail(_dot_)com <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

Scott,

LibXslt is calling the version of libxml it was compiled against, which is
not always the one installed on your system. When working with libraries
you need to be careful with updates as they may break things like they did
on your case.

To test try running

xsltproc --version

Which should tell you the versions the different libraries were compiled
against

My guess is that you'll have to upgrade libxslt so that it matches your
installed version of libxml

Sent from my iPad

On Jul 14, 2014, at 12:51 PM, Scott Young sjyoung(_at_)lbl(_dot_)gov <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

Hello,

I am trying to run the python module lxml (in order to run python-docx).
I can import lxml okay, but whenever I try to import etree from lxml, I get
an ImportError:

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

Here is my configuration information:
- Python 2.7.6 running with Enthought Canopy.
- Ubuntu 14.04 on VMWare Worstation 10.
- lxml 3.3.5
- libxml2 2.9.1+dfsg1-3ubuntu4
- libxslt1 1.1.28-2build1

It seems that the xslt library is calling for version 2.9.0 of libxml2,
but I'm not sure why, because it appears that 2.9.1 has been out for a
while.  I also cannot tell for sure whether this is a problem with lxml,
libxslt, or libxml2.  I posted to the lxml list, and they didn't have any
solutions, so I am now trying xslt.

Any guidance or suggestions would be appreciated!  Thank you!

Thanks,
Scott
  XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <http://-list/556108> (by email)

  XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <-list/2555155> (by
email <>)

--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>