Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named lxml.etree

I'm trying to import premailer in my project, but it keeps failing at the etree import. I installed the 2.7 binary for lxml. The lxml module imports fine, and it's showing the correct path to the library folder if I log the lxml module, but I can't import etree from it. There's an etree.pyd in the lxml folder but python can't seem to see\read it.

I'm on windows7 64bit.

Does anyone know what's going wrong here?

like image 705
Joren Avatar asked Jul 17 '13 00:07

Joren


3 Answers

Try adding the library to the GAE .yaml file.

Under libraries add

-name: lxml    
 version: latest
like image 154
Samer Makary Avatar answered Oct 03 '22 04:10

Samer Makary


Try to using etree without import it like (lxml.etree() ) I think it function no module or install it if it a module

like image 30
Mr Sam Avatar answered Oct 03 '22 03:10

Mr Sam


Install premailer using

pip install premailer

like image 32
Adnan Rizwee Avatar answered Oct 03 '22 04:10

Adnan Rizwee