gpt4 book ai didi

python - 导入错误 : No module named '_curses' when trying to import blessings

转载 作者:IT老高 更新时间:2023-10-28 21:02:52 30 4
gpt4 key购买 nike

我正在尝试运行这个:

from blessings import Terminal

t = Terminal()

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

with t.location(0, t.height - 1):
print ('This is at the bottom.')

这里的第一个例子是:https://pypi.python.org/pypi/blessings .

但是,我收到此错误:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\�����\AppData\Local\Programs\Python\Python35- 32\lib\site-packages\blessings\__init__.py", line 5, in <module>
import curses
File "C:\Users\�����\AppData\Local\Programs\Python\Python35-32\lib\curses\__init__.py", line 13, in <module>
from _curses import *
ImportError: No module named '_curses'

我的系统是win10 x64。

最佳答案

同时 - Windows 10 上的 Python 2.7.15 - 可以通过以下方式添加对诅咒的支持:

pip install windows-curses

关于python - 导入错误 : No module named '_curses' when trying to import blessings,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35850362/

30 4 0