FAQ
Hello Everyone!
I am hoping that someone out there can help me out with this
problem. We are using a gumstix platform to develop an embedded
system. All that really matters is that it is an ARM processor
running an embedded linux, details to follow. Gumstix has its own
kernel tree that we cross compile for the system. We do have python,
and it has all of the modules that I need except for one. I need
ncurses (module curses). I can't seem to figure out how to get it to
work - and the only documentation I can find is for Windows (because
windows doesn't have ncurses). We have enabled ncurses support in the
kernel menu, and that has not helped. I can't seem to trace down
where we would 'enable' ncurses support? All other modules seem to
work that I've tried (termios, sys, os, etc.)

Output from python:
[root at gumstix ~]# python
, Feb 20 2008, 11:07:36)
[GCC 4.1.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import curses
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/curses/__init__.py", line 15, in ?
from _curses import *
ImportError: No module named _curses

[root at gumstix ~]# uname -a
Linux gumstix 2.6.21gum #1 Tue Mar 4 15:31:07 EST 2008 armv5tel
unknown

[root at gumstix lib]# ls /usr/lib/*curses*
/usr/lib/libcurses.a@ /usr/lib/libncurses.a /usr/lib/
libncurses.so@

[root at gumstix lib-dynload]# ls _*
_bisect.so* _codecs_tw.so* _random.so*
_codecs_cn.so* _csv.so* _socket.so*
_codecs_hk.so* _heapq.so* _testcapi.so*
_codecs_iso2022.so* _hotshot.so* _weakref.so*
_codecs_jp.so* _locale.so*
_codecs_kr.so* _multibytecodec.so*

I hope this is trivial, and I apologize ahead of time if so. Would
this perhaps be a compilation issue? Something we have to turn on in
the python compile?

Thank you,
Blaine Booher
University of Cincinnati

Search Discussions

  • Diez B. Roggisch at Mar 6, 2008 at 8:17 pm

    blaine schrieb:
    Hello Everyone!
    I am hoping that someone out there can help me out with this
    problem. We are using a gumstix platform to develop an embedded
    system. All that really matters is that it is an ARM processor
    running an embedded linux, details to follow. Gumstix has its own
    kernel tree that we cross compile for the system. We do have python,
    and it has all of the modules that I need except for one. I need
    ncurses (module curses). I can't seem to figure out how to get it to
    work - and the only documentation I can find is for Windows (because
    windows doesn't have ncurses). We have enabled ncurses support in the
    kernel menu, and that has not helped. I can't seem to trace down
    where we would 'enable' ncurses support? All other modules seem to
    work that I've tried (termios, sys, os, etc.)

    Output from python:
    [root at gumstix ~]# python
    , Feb 20 2008, 11:07:36)
    [GCC 4.1.1] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    import curses
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/lib/python2.4/curses/__init__.py", line 15, in ?
    from _curses import *
    ImportError: No module named _curses

    [root at gumstix ~]# uname -a
    Linux gumstix 2.6.21gum #1 Tue Mar 4 15:31:07 EST 2008 armv5tel
    unknown

    [root at gumstix lib]# ls /usr/lib/*curses*
    /usr/lib/libcurses.a@ /usr/lib/libncurses.a /usr/lib/
    libncurses.so@

    [root at gumstix lib-dynload]# ls _*
    _bisect.so* _codecs_tw.so* _random.so*
    _codecs_cn.so* _csv.so* _socket.so*
    _codecs_hk.so* _heapq.so* _testcapi.so*
    _codecs_iso2022.so* _hotshot.so* _weakref.so*
    _codecs_jp.so* _locale.so*
    _codecs_kr.so* _multibytecodec.so*

    I hope this is trivial, and I apologize ahead of time if so. Would
    this perhaps be a compilation issue? Something we have to turn on in
    the python compile?
    Usually, you need not only the libraries but also the headers at
    compilation time. Most probably these were missing.

    Diez
  • Blaine at Mar 7, 2008 at 12:08 am

    I hope this is trivial, and I apologize ahead of time if so. Would
    this perhaps be a compilation issue? Something we have to turn on in
    the python compile?
    Usually, you need not only the libraries but also the headers at
    compilation time. Most probably these were missing.

    Diez
    Thank you for our response. Do you mean that the ncurses header
    should be in /usr/include upon compilation of python? Will python
    automatically pick up on these headers, or would I need to change
    compilation options? Thanks! -Blaine
  • Peter Otten at Mar 7, 2008 at 7:35 am

    blaine wrote:

    I hope this is trivial, and I apologize ahead of time if so. Would
    this perhaps be a compilation issue? Something we have to turn on in
    the python compile?
    Usually, you need not only the libraries but also the headers at
    compilation time. Most probably these were missing.

    Diez
    Thank you for our response. Do you mean that the ncurses header
    should be in /usr/include upon compilation of python? Will python
    automatically pick up on these headers, or would I need to change
    compilation options? Thanks! -Blaine
    Just rerun the ./configure script -- it should detect the presence of the
    required header file automatically. If all went well you'll see "yes" three
    times:

    $ sudo aptitude install ncurses-dev
    [...]
    $ ./configure > tmp.txt
    [...]
    $ grep ncurses tmp.txt
    checking ncurses.h usability... yes
    checking ncurses.h presence... yes
    checking for ncurses.h... yes


    Peter

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 6, '08 at 7:47p
activeMar 7, '08 at 7:35a
posts4
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase