我在Windows 7(x64)计算机上安装了Python 2.7/3.4.我想在Windows上测试curses.
Curses已安装但无法正常工作:
>>> import curses
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Tools\Python3.4.2\lib\curses\__init__.py", line 13, in <module>
from _curses import *
ImportError: No module named '_curses'
Run Code Online (Sandbox Code Playgroud)
该文件说:
因此,Python 3.4的Windows安装程序安装了具有未解析依赖项的curses.有人可以说这是一个错误......
好的,我调查了UniCurses.它是PDCurses的包装器:
UniCurses是Python 2.x/3.x的包装器,它在所有平台(MS Windows,Linux和Mac OS X)上提供统一的Curses功能集,其语法接近原始NCurses的语法.为了在Microsoft Windows系统上提供Curses功能,它包装了PDCurses.
通过pip3导致错误安装UniCurses :
C:\Users\Paebbels>pip3 install UniCurses
Downloading/unpacking UniCurses
Could not find any downloads that satisfy the requirement UniCurses
Some externally hosted files were ignored (use …Run Code Online (Sandbox Code Playgroud)