Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > ImportError: No module named HTMLParser

Reply
Thread Tools

ImportError: No module named HTMLParser

 
 
Mike
Guest
Posts: n/a
 
      05-03-2006
Hi

I'm getting the above message on a server installation (2.4) of Python.
I don't get the error using my script on my own machine. I'm trying to
use the non-sgmllib one - the standard HTMLParser but it won't import
on the server. How can I go about checking which file should reside
where?

I'm a Python newbie so please bear with me.

Thanks,
Mike

 
Reply With Quote
 
 
 
 
Fredrik Lundh
Guest
Posts: n/a
 
      05-03-2006
Mike wrote:

> I'm getting the above message on a server installation (2.4) of Python.
> I don't get the error using my script on my own machine. I'm trying to
> use the non-sgmllib one - the standard HTMLParser but it won't import
> on the server. How can I go about checking which file should reside
> where?


are you sure you're running 2.4 on the server ? (or rather, that your
Python programs are picking up the 2.4 installation, and not some older
version).

did you do the installation yourself ? have you checked the contents of
the sys.path variable ? does the output from

python -v -c "import HTMLParser"

look correct (i.e. does it search for stuff where you actually installed it) ?

</F>



 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      05-03-2006
Thanks - it turned out that the Python installation on our vendor's
server is a cut-down one. I have had to place the HTMLParser source in
a package off the a sys.path directory and import it from there - it
now works.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to install module, No module named scipy_distutils.core (but ihave scipy) process Python 1 10-17-2008 06:19 PM
PyParsing module or HTMLParser Lad Python 7 03-31-2005 04:18 PM
I use htmlparser http://htmlparser.sourceforge.net/javadoc/index.html mike Java 0 01-11-2005 03:46 PM
Using JYTHON inside ANT : access os module -> "ImportError: no module named javaos" eric_bellard Python 1 10-07-2004 05:41 AM
Question regarding HTMLParser module. Adonis Python 1 07-28-2003 04:48 AM



Advertisments