Windows 7(x64)マシンにPython 2.7/3.4がインストールされています。私はWindowsでcursesをテストしたいと思います。Windows7のPython 3.4の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'
documentationは言う:未解決の依存関係を持つ
The Windows version of Python doesn’t include the curses module. A ported version called UniCurses is available.
ので、Pythonの3.4のWindowsのインストーラがインストール呪い。これはバグと名付けることができます...
OK、私はUniCursesを調べました。それはPDCursesのラッパーです:エラーでpip3
結果を経由して
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 .
インストール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が利用可能です)。
パブリックドメインのcurses(PDCurses)も調べました。 PD Cureses 3.4は2008年後半からのものです。だから7歳です。 Windows 7でもWindows 8.1でもWindows 10でも動作するとは思えません。
PythonでWindows上でcursesを実行する方法はありますか?
(WindowsのPythonのではなく、CygWinのパイソン!)
基本的な非互換性の問題はないので、おそらく動作させることができますが、このようにするとUniCursesを変更する方法(およびビルド*を行う方法)を学ぶ必要があります。 –
Christoph GohlkeにはWindowsの[curses]ビルド(http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses)があります。 curses-2.2-cp34-none-win_amd64.whlをダウンロードし、[wheel install](https://pip.pypa.io/en/latest/user_guide.html#installing-from-wheels)の指示に従います。 – eryksun
@eryksunあなたのコメントを回答として書いてください。投票することができます。インストールはうまくいった。 – Paebbels