我试图运行这段代码时:导入错误:没有名为模块“_curses”试图导入祝福
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 64。
尝试为Windows这个[诅咒](http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses)执行。 – eryksun
我在Windows 7上遇到了同样的问题,并且正在寻找解决方法。在自述文件中提到“colorama”用于Windows的部分意味着该库以某种方式在Windows上工作。我对Python有点新,所以我不确定在try/except构造中包装import语句是否是一种有效的方法,但我正在研究它。此外,FYI可以确认称为'祝福'的'祝福'的叉具有同样的问题(v1.6)。 –
@AdamP更新,['祝福'](https://github.com/jquast/blessed)模块的自述文件与明确表示模块无法工作的祝福模块的语句略有不同Windows命令提示符: “Blessed不提供... Windows命令提示符支持。python for windows的python for python目前仅提供部分支持 - 有计划将ansi模块与colorama合并以解决问题这个,补丁欢迎!“ –