curses is not imported under Linux (and Python 2.4)

Discussion in 'Python' started by Konrad Koller, Jan 6, 2005.

  1. import curses
    produces the ImportError: No module named _curses
    ("from _curses import *" in line 15 in
    Of course imp.find_module ("_curses") reports the same error.
    How can I make use of the curses package for writing a Python script
    with curses?
    Konrad Koller, Jan 6, 2005
    1. Advertisements

  2. Konrad Koller

    Steve Holden Guest

    I get the same thing under Windows: _curses is the compiled extension
    supporting the curses library, so I must presume that isn't supported by
    default on Windows.

    No problems under Cygwin or on Linux.

    Googling for "python curses windows" might provide a few pointers.

    Steve Holden, Jan 6, 2005
    1. Advertisements

  3. Konrad Koller

    Craig Ringer Guest

    What Linux distro?
    Is the Python version you're running one you compiled, one that shipped
    with the distro, or a 3rd party RPM?

    At a guess, I'd say you compiled it yourself and you don't have the
    ncurses development packages (providing the ncurses header files and
    static libs) installed.
    Craig Ringer, Jan 7, 2005
  4. Thanks for your hint.
    compiled with Python-2.4.tar.bz2
    see above, but I did not exclude anything, it was a totally normal
    I did the same installation of Python2.4 on a different computer with
    Fedora2 and found there the and in
    lib-dynload, which I missed in SuSE Linux, although under SuSE the
    curses package was present in Lib. I don't understand this strange
    behavior between the two installations.
    After having the 2 mentioned static libs transfered from the "Fedora
    computer" to the the "SuSE computer" the curses worked fine under
    SuSE linux

    Konrad Koller
    Konrad Koller, Jan 9, 2005
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.