[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GMG-Devel] Python 3 - ImportError: cannot import name etree (Python
From: |
Ben Sturmfels |
Subject: |
Re: [GMG-Devel] Python 3 - ImportError: cannot import name etree (Python 3.3/Trisquel 7.0/python3-lxml 3.3.3) |
Date: |
Mon, 07 Sep 2015 12:34:27 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 |
Thanks Matt, yes importing "html" behaves similarly:
>>> from lxml import html
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/lxml/html/__init__.py", line
42, in <module>
from lxml import etree
ImportError: cannot import name etree
On 07/09/15 04:06, Matt Molyneaux wrote:
> Looks like a Trisquel issue to me. Try importing lxml.html via a
> python3 interpreter and you should see the same error.
>
> On 6 Sep 2015 16:05, "Ben Sturmfels" <address@hidden
> <mailto:address@hidden>> wrote:
>
> Hi there,
>
> I'm having a play with the Python 3 support.
>
> When running `./bin/gmg dbupdate` I'm getting the following (full
> traceback attached separately):
>
> File "/usr/lib/python3/dist-packages/lxml/html/__init__.py", line
> 42, in <module>
> from lxml import etree
> ImportError: cannot import name etree
>
> That's running with Python 3.3 and lxml==3.3.3 from the Trisquel 7.0
> package python3-lxml. I've just done a quick test and this import works
> fine on Python 3.4. I've also found that lxml==3.3.3 works fine when
> installed from PyPI. It seems that the Trisquel package has created:
>
>
> /usr/lib/python3/dist-packages/lxml/etree.cpython-34m-x86_64-linux-gnu.so
> <http://etree.cpython-34m-x86_64-linux-gnu.so>
>
> but not:
>
> /usr/lib/python3/dist-packages/lxml/etree.cpython-33m-x86_64-linux-gnu.so
> <http://etree.cpython-33m-x86_64-linux-gnu.so>
>
> Is this likely just a bug in the Trisquel python3-lxml package?
>
> And a slightly unrelated question, given Python 3 support hasn't been
> made official yet, would it be worth targetting Python 3.4 by default
> now that it's part of stable Debian and Trisquel (and presumably Ubuntu
> too)?
>
> Cheers,
> Ben
>
> --
> Ben Sturmfels
>
> Sturm
> www.sturm.com.au <http://www.sturm.com.au>
> (03) 9024 2467
>
> _______________________________________________
> devel mailing list
> address@hidden <mailto:address@hidden>
> http://lists.mediagoblin.org/listinfo/devel
>
signature.asc
Description: OpenPGP digital signature