我正试着运行这个:
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上的已知错误。它已经开了5年了,所以不要屏住呼吸。
非正式的
curses
构建是不够的,因为它还需要fcntl
,这不太可能在短期内被移植。同时-Python 2.7.15 on Windows 10-curses支持可以通过以下方式添加:
Windows
计算机不支持^{从here安装
curses
的非官方windows二进制文件,然后重试。相关问题 更多 >
编程相关推荐