I have a running Python 2.7/3.4 installation on my Windows 7 (x64) machine. I would like to test curses on Windows.
Curses is installed but not working:
>>> import curses
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:ToolsPython3.4.2libcurses\__init__.py", line 13, in <module>
from _curses import *
ImportError: No module named '_curses'
The documentation says:
The Windows version of Python doesn’t include the curses module. A ported version called UniCurses is available.
So, the Windows installer of Python 3.4 installed curses with unresolved dependencies. One could name this a bug...
OK, I looked into UniCurses. It's a wrapper for PDCurses:
UniCurses is a wrapper for Python 2.x/3.x that provides a unified set of Curses functions on all platforms (MS Windows, Linux, and Mac OS X) with syntax close to that of the original NCurses. To provide the Curses functionality on Microsoft Windows systems it wraps PDCurses.
Installing UniCurses via pip3
results in an error:
C:UsersPaebbels>pip3 install UniCurses
Downloading/unpacking UniCurses
Could not find any downloads that satisfy the requirement UniCurses
Some externally hosted files were ignored (use --allow-external UniCurses to allow).
Cleaning up...
No distributions at all found for UniCurses
Storing debug log for failure in C:UsersPaebbelspippip.log
The link to SourceForge on Python's UniCurses site is dead. A manual search an SourceForge helped to find UniCurses for Python again.
But, the UniCurses 1.2 installer can not find any Python installation in my Windows registry. (Python 2.7.9 and Python 3.4.2 are available).
I also looked into Public Domain Curses (PDCurses). PD Cureses 3.4 is from late 2008. So it's 7 years old. I don't believe it will work either with Windows 7 nor Windows 8.1 or Windows 10.
Is there any way to get curses running on Windows with Python.
(The Windows Python, not the CygWin Python!)
question from:
https://stackoverflow.com/questions/32417379/what-is-needed-for-curses-in-python-3-4-on-windows7 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…