简体   繁体   English

Python 中的 Curses Module Eroor

[英]Curses Module Eroor in Python

i try to import curses but when i run the program it shows this error我尝试导入curses,但是当我运行该程序时,它显示此错误

    import random
    import curses

    s = curses.initscr()
    curses.curs_set(0)
    sh, sw = s.getmaxyx()
    w = curses.newin(sh, sw, 0, 0)
    w.keypad(1)

    w.timeout(100)

ModuleNotFoundError: No module named '_curses' ModuleNotFoundError: 没有名为“_curses”的模块

The Windows version of Python doesn't include the curses module. Python 的 Windows 版本不包含 curses 模块。 There are some ports for windows like windows-curses that implement the same API.有一些 Windows 端口,如实现相同 API 的windows-curses You should install one of those modules.您应该安装这些模块之一。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM