[lxml-dev] No module named lxml
I'm not really sure how to setup lxml properly, so I need some help. Summary: import lxml gives the following error: ImportError: No module named lxml Background: I first tried out the install instructions here: http://codespeak.net/lxml/installation.html#ms-windows This involved 3 steps: 1) using easy_install lxml 2) Installing libxml 3) Installing libxslt Suffice to say that method never worked right. During all those steps, I probably did something wrong. Next, I tried the Windows binary egg method (after I deleted the previous lxml install). I downloaded: lxml-2.2.2-py2.6-win-amd64.egg and I copied the file to: Python2.6.1\Lib\site-packages\lxml-2.2.2-py2.6-win-amd64.egg Questions: * Is this the correct way to install an egg? (or is there more to it?) * Could, elementree or html5lib packages be causing a conflict? * So, what am I doing wrong? :) Is it something simple that I missed or should it be working the way I have it now? System info: Windows Vista 64bit Python 2.6.4 64bit Contents of my site-packages: babel-0.9.4-py2.6.egg cherrypy-3.1.1-py2.6.egg decorator-3.0.0-py2.6.egg django-1.0.2_final-py2.6.egg django_wikiapp-0.2.0-py2.6.egg 939 easy-install.pth elementtree-1.2.7_20070827_preview-py2.6.egg elixir-0.3.0-py2.6.egg elixir-0.6.1-py2.6.egg FormEncode-1.2.3dev_r0-py2.6.egg Genshi-0.5.1-py2.6.egg Genshi.egg-info html5lib-0.11.1-py2.6 - Copy.zip html5lib-0.11.1-py2.6.egg lxml-2.2.2-py2.6-win-amd64.egg mako-0.2.4-py2.6.egg nose-0.10.4-py2.6.egg paste-1.7.2-py2.6.egg pastedeploy-1.3.3-py2.6.egg pastescript-1.7.3-py2.6.egg posterity-0.6-py2.6.egg Pylons-0.9.7-py2.6.egg pysqlite-2.5.5-py2.6.egg-info pysqlite2 pytidylib-0.1.2-py2.6.egg-info README.txt resolver-0.2.1-py2.6.egg selector-0.8.11-py2.6.egg setuptools-0.6c9-py2.6.egg setuptools.pth sqlalchemy-0.3.11-py2.6.egg sqlalchemy-0.5.3-py2.6.egg tempita-0.2-py2.6.egg tidy tidylib uTidylib-0.2-py2.6.egg-info weberror-0.10.1-py2.6.egg webob-0.9.6.1-py2.6.egg webtest-1.1-py2.6.egg wsgiref-0.1.2-py2.6.egg xlrd xlrd-0.6.1-py2.6.egg-info zzzzzzhtml5lib-0.11.1-py2.6 - Copyzzzzzzzzzzz _________________________________________________________________ Bing brings you maps, menus, and reviews organized in one place. http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1
Hi, Kevin Ar18, 06.11.2009 04:49:
import lxml gives the following error:
ImportError: No module named lxml
Normal Python import error when it can't find a module or package.
Background:
I first tried out the install instructions here: http://codespeak.net/lxml/installation.html#ms-windows
This involved 3 steps: 1) using easy_install lxml 2) Installing libxml 3) Installing libxslt
No, it just involves the step that is mentioned in that section, i.e. 1).
Suffice to say that method never worked right.
No, that's not enough. Please provide the output of the easy_install call.
During all those steps, I probably did something wrong.
Or something went wrong and you didn't notice.
Next, I tried the Windows binary egg method (after I deleted the previous lxml install).
easy_install *is* the "Windows binary egg method".
I downloaded: lxml-2.2.2-py2.6-win-amd64.egg and I copied the file to:
Python2.6.1\Lib\site-packages\lxml-2.2.2-py2.6-win-amd64.egg
Ok, that's where it came from then. I noticed it in the file list in site-packages below.
* Is this the correct way to install an egg? (or is there more to it?)
That's not how eggs work. They require installation.
* Could, elementree or html5lib packages be causing a conflict?
No.
Contents of my site-packages: [...] lxml-2.2.2-py2.6-win-amd64.egg [...]
Move that file out of site-packages and run "easy_install" on it. If that fails, please provide the complete output. Stefan
Hi, Kevin Ar18, 06.11.2009 04:49:
I'm not really sure how to setup lxml properly, so I need some help.
Please check if the updated installation instructions are clearer now. http://codespeak.net/lxml/installation.html Stefan
I'm not really sure how to setup lxml properly, so I need some help.
Please check if the updated installation instructions are clearer now.
http://codespeak.net/lxml/installation.html That does help some, yes. Based on both of your replies I was able to get it working. However, there are still some potential points for confusion.
Did you actually want some help to clarify parts of the Installation page (to make it easier for newcomers) or were you just asking if I was able to install it? I mean, I would be willing to, but I don't think that's what you really had in mind when you asked. :) On the other hand, if you do, then I guess I have a few questions I would need to ask first. Thanks again _________________________________________________________________ Hotmail: Trusted email with Microsoft's powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141664/direct/01/ http://clk.atdmt.com/GBL/go/177141664/direct/01/
Hi, Kevin Ar18, 07.11.2009 02:58:
I'm not really sure how to setup lxml properly, so I need some help. Please check if the updated installation instructions are clearer now.
That does help some, yes. Based on both of your replies I was able to get it working. However, there are still some potential points for confusion.
Did you actually want some help to clarify parts of the Installation page (to make it easier for newcomers) or were you just asking if I was able to install it? I mean, I would be willing to, but I don't think that's what you really had in mind when you asked. :)
Any contribution is appreciated.
On the other hand, if you do, then I guess I have a few questions I would need to ask first.
Go ahead, this mailing list is there for getting questions answered (amongst other things). Stefan
participants (2)
-
Kevin Ar18
-
Stefan Behnel