ImportError: No module named '_curses' when trying to import blessings

前端 未结 4 2109
死守一世寂寞
死守一世寂寞 2021-02-05 04:46

I am trying to run this:

from blessings import Terminal

t = Terminal()

print (t.bold(\'Hi there!\'))
print (t.bold_red_on_bright_green(\'It hurts my eyes!\'))
         


        
4条回答
  •  不知归路
    2021-02-05 05:22

    The curses module is not supported on Windows machines. From the module documentation:

    While curses is most widely used in the Unix environment, versions are available for DOS, OS/2, and possibly other systems as well. This extension module is designed to match the API of ncurses, an open-source curses library hosted on Linux and the BSD variants of Unix.

    Install the unofficial windows binary for curses from here and try again.

提交回复
热议问题