python 3.9.5中的诅咒在哪里?

时间:2021-05-26 19:05:10

标签: python

我刚从 3.6 更新,在 pip 列表中找不到curses。当我尝试运行我的程序时,我得到

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 不自带curses了吗?

编辑:这是在 Ubuntu 中

2 个答案:

答案 0 :(得分:0)

对于 Linux,您需要安装与操作系统无关的 UniCurses。请注意,UniCurses 已经有一段时间不需要维护了,但您可以找到有关它的更多信息 here

答案 1 :(得分:0)

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

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

相关问题