2

64 ビット Linux OS で Enthought の Canopy 環境を使用しています。エディターに接続されている Ipython コンソールでは、すべて正常に動作します。しかし、ターミナルで ipython を使用してマジック関数を使用しようとすると、次のエラーが発生します。

---------------------------------------------------------------------------
error                                     Traceback (most recent call last)
<ipython-input-3-29a4050aa687> in <module>()
----> 1 get_ipython().show_usage()

/home/shahensha/Development/Canopy/appdata/canopy-1.0.3.1262.rh5-x86_64/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in show_usage(self)
   2931     def show_usage(self):
   2932         """Show a usage message"""
-> 2933         page.page(IPython.core.usage.interactive_usage)
   2934 
   2935     def extract_input_lines(self, range_str, raw=False):

/home/shahensha/Development/Canopy/appdata/canopy-1.0.3.1262.rh5-x86_64/lib/python2.7/site-packages/IPython/core/page.pyc in page(strng, start, screen_lines, pager_cmd)
    188     if screen_lines <= 0:
    189         try:
--> 190             screen_lines += _detect_screen_size(screen_lines_def)
    191         except (TypeError, UnsupportedOperation):
    192             print(str_toprint, file=io.stdout)

/home/shahensha/Development/Canopy/appdata/canopy-1.0.3.1262.rh5-x86_64/lib/python2.7/site-packages/IPython/core/page.pyc in _detect_screen_size(screen_lines_def)
    112     # Proceed with curses initialization
    113     try:
--> 114         scr = curses.initscr()
    115     except AttributeError:
    116         # Curses on Solaris may not be complete, so we can't use it there

/home/shahensha/Development/Canopy/appdata/canopy-1.0.3.1262.rh5-x86_64/lib/python2.7/curses/__init__.pyc in initscr()
     31     # instead of calling exit() in error cases.
     32     setupterm(term=_os.environ.get("TERM", "unknown"),
---> 33               fd=_sys.__stdout__.fileno())
     34     stdscr = _curses.initscr()
     35     for key, value in _curses.__dict__.items():

error: setupterm: could not find terminfo database

そのため、Canopy が提供するものではない最低限の iPython シェルをインストールし、そこで同じ魔法の機能を試してみましたが、問題なく動作しました。

インストールで何か間違ったことをしましたか? 助けてください

どうもありがとう

4

3 に答える 3