[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Ncurses not found - embedded linux

frikk

3/6/2008 7:48:00 PM

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@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@gumstix ~]# uname -a
Linux gumstix 2.6.21gum #1 Tue Mar 4 15:31:07 EST 2008 armv5tel
unknown

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

[root@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
3 Answers

Diez B. Roggisch

3/6/2008 8:18:00 PM

0

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@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@gumstix ~]# uname -a
> Linux gumstix 2.6.21gum #1 Tue Mar 4 15:31:07 EST 2008 armv5tel
> unknown
>
> [root@gumstix lib]# ls /usr/lib/*curses*
> /usr/lib/libcurses.a@ /usr/lib/libncurses.a /usr/lib/
> libncurses.so@
>
> [root@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

frikk

3/7/2008 12:08:00 AM

0

> > 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

3/7/2008 7:36:00 AM

0

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