Ho un'installazione Python 2.7/3.4 in esecuzione sulla mia macchina Windows 7 (x64). Mi piacerebbe testare le maledizioni su Windows.Cosa è necessario per curses in Python 3.4 su Windows7?
Maledizioni è installato ma non funziona:
>>> 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'
Il documentation dice: maledizioni
The Windows version of Python doesn’t include the curses module. A ported version called UniCurses is available.
Così, il programma di installazione di Windows di Python 3.4 installato con dipendenze non risolte. Si potrebbe chiamare questo un bug ...
OK, ho cercato su UniCurses. E 'un wrapper per 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 .
Installazione UniCurses via pip3
risultati in un errore:
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
Il link al sito SourceForge sul UniCurses di Python è morto. Una ricerca manuale in SourceForge ha aiutato a trovare di nuovo UniCurses for Python.
Tuttavia, il programma di installazione di UniCurses 1.2 non è in grado di trovare alcuna installazione Python nel mio registro di Windows. (Sono disponibili Python 2.7.9 e Python 3.4.2).
Ho anche esaminato Maledizioni di dominio pubblico (PDCurses). PD Cureses 3.4 è dalla fine del 2008. Quindi ha 7 anni. Non credo che funzionerà né con Windows 7 né con Windows 8.1 o Windows 10.
C'è un modo per ottenere curses in esecuzione su Windows con Python.
(Windows Python, non il CygWin Python!)
Probabilmente può essere fatto funzionare, poiché non c'è alcun problema di incompatibilità di base - ma andando in questo modo, dovrete imparare come modificare UniCurses (e creare * che *). –
Christoph Gohlke ha una build di Windows di [curses] (http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses). Scarica curses-2.2-cp34-none-win_amd64.whl e segui le istruzioni per [installare una ruota] (https://pip.pypa.io/en/latest/user_guide.html#installing-from-wheels). – eryksun
@eryksun Si prega di scrivere il tuo commento come risposta, quindi posso votare su di esso. L'installazione è andata bene. – Paebbels