我在我的Windows7 (x64)机器上安装了Python2.7/3.4。我想在Windows上测试诅咒。
已安装了诅咒,但不起作用:
>>> 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'文档说:
因此,Python3.4的Windows安装了一些未解决的依赖项。你可以把它命名为窃听器..。
好吧,我查了一下UniCurses。它是PDCurses的包装器
UniCurses是Python2.x/3.x的包装器,它在所有平台(MS、Linux和Mac )上提供了一组统一的Curses函数,语法接近于原始NCurses。为了在Microsoft系统上提供Curses功能,它封装了PDCurses。
通过UniCurses安装pip3会导致错误:
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.logPython的SourceForge站点上的UniCurses链接已经失效。手动搜索一个SourceForge帮助再次找到了UniCurses for Python。
但是,UniCurses 1.2安装程序在我的Windows注册表中找不到任何安装。(Python2.7.9和Python3.4.2可用)。
我还研究了公共域诅咒(PDCurses)。PD Cureses 3.4是从2008年底开始的。所以它有7年历史了。我不相信它将工作,无论是Windows 7,Windows 8.1或Windows 10。
是否有任何方法在WindowsPython.上运行诅咒?
( Windows,而不是CygWin Python!)
发布于 2016-12-19 14:05:00
如果您手动安装Windows或其他软件包,您可以使用跨平台诅咒(Windows、MacOS、GNU/Linux)。
您可以为python使用诅咒包装器。在所有终端中使用Fedora 25,使用git bash、powershell或cmd使用Windows 10。
更新:
发布于 2019-06-11 04:47:44
现在我们可以使用pip install windows-curses轻松地在python3.7上安装
发布于 2015-12-23 15:26:50
您可以尝试我的独角兽之镜,它包括pdcurses。我现在已经使用python3.5.0在windows 7上运行了它。
要快速测试它是否适合您,只需克隆存储库,并在其toplevel目录中创建和运行python脚本,其中包含以下内容
from unicurses import *
stdscr = initscr()
addstr("hello world")
getch()https://stackoverflow.com/questions/32417379
复制相似问题