【问题标题】:Where is curses in python 3.9.5?python 3.9.5 中的诅咒在哪里?
【发布时间】:2021-08-15 01:42:22
【问题描述】:

我刚从 3.6 更新,curses 在 pip 列表中无处可寻。当我尝试运行我的程序时,我得到了

Traceback (most recent call last):
  File "/media/HD/Documents/Python/program/menu.py", line 1, in <module>
    import curses
  File "/usr/local/lib/python3.9/curses/__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

“pip3 install curses”给了我

ERROR: Could not find a version that satisfies the requirement curses (from versions: none)
ERROR: No matching distribution found for curses

有什么想法吗? python 是不是不再自带诅咒了?

编辑:这是在 Ubuntu 中

【问题讨论】:

  • 你是在windows机器上吗?
  • 这是在linux上
  • 我相信你正在寻找的是所谓的 unicurses,但我可能是错的,因为我不是 Linux 用户。
  • 这能回答你的问题吗? Error no module named curses

标签: python


【解决方案1】:

我通过使用较早版本的 python (3.6.9) 解决了这个问题

遗憾的是,这可能是唯一的解决方案。

【讨论】:

    【解决方案2】:

    对于 Linux,您需要安装独立于操作系统的 UniCurses。请注意,UniCurses 暂时不需要维护,但您可以在here 找到更多信息。

    【讨论】:

    猜你喜欢
    • 2014-04-23
    • 2012-04-08
    • 1970-01-01
    • 2013-11-22
    • 2017-03-19
    • 2012-01-24
    • 1970-01-01
    • 1970-01-01
    • 2010-09-24
    相关资源
    最近更新 更多