ImportError: No module named HTMLParser

Discussion in 'Python' started by Mike, May 3, 2006.

  1. Mike

    Mike Guest

    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
    Mike, May 3, 2006
    #1
    1. Advertising

  2. 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>
    Fredrik Lundh, May 3, 2006
    #2
    1. Advertising

  3. Mike

    Mike Guest

    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.
    Mike, May 3, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike
    Replies:
    0
    Views:
    871
  2. Harry George
    Replies:
    0
    Views:
    5,695
    Harry George
    Jul 15, 2003
  3. Mikael Olofsson
    Replies:
    0
    Views:
    432
    Mikael Olofsson
    Jul 16, 2003
  4. Carsten Gehling

    pso - ImportError: No module named url

    Carsten Gehling, Jul 16, 2003, in forum: Python
    Replies:
    0
    Views:
    373
    Carsten Gehling
    Jul 16, 2003
  5. eric_bellard
    Replies:
    1
    Views:
    5,082
    CarlosRivera
    Oct 7, 2004
Loading...

Share This Page