诅咒安装但不工作:
>>> 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'
The Windows version of Python doesn’t include the 07001 module. A ported version called 07002 is available.
所以,Python 3.4的Windows安装程序安装了没有解决的依赖关系的curses.人们可以命名这个bug
好的,我看了UniCurses.这是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 07003.
通过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 --allow-external UniCurses to allow). Cleaning up... No distributions at all found for UniCurses Storing debug log for failure in C:\Users\Paebbels\pip\pip.log
在Python UniCurses网站上的SourceForge链接已经死了.一个手动搜索SourceForge帮助找到了UniCurses for Python.
但是,UniCurses 1.2安装程序在我的Windows注册表中找不到任何Python安装. (Python 2.7.9和Python 3.4.2可用).
我也研究了公共领域诅咒(PDCurses). PD Cureses 3.4是从2008年底开始的,所以7岁.我不相信它可以与Windows 7,Windows 8.1或Windows 10.
有什么办法可以使用Python在Windows上运行curses.
(Windows Python,而不是CygWin Python!)
1º安装车轮包装.你需要更多关于wheel click here的信息吗?
2º转到this repository.
3º用python版本下载一个包,例如python 3.4:
curses-2.2-cp34-none-win_amd64.whl
4º安装它(这个命令如果是Windows,在GNU / Linux安装像其他包)
python -m pip install curses-2.2-cp34-none-win32.whl
5º只包含在你的python脚本中:
import curses
您可以使用诅咒包装器进行python.在所有终端使用Fedora 25,Windows 10使用git bash,powershell或cmd.
更新:
> Windows here中的诅咒的替代方法.
> Windows here中的Console用户界面.
>有趣的教程here.