asciinema缺少文件:ImportError:没有名为'termios'的模块

时间:2014-04-08 15:32:55

标签: python pip

asciinema rec内部运行asciinema.exeC:\Python34\Scripts时,这是pip命令在git bash中工作的唯一位置。

$ asciinema.exe
Traceback (most recent call last):
  File "c:\Python34\Scripts\asciinema-script.py", line 9, in <module>
    load_entry_point('asciinema==0.9.8', 'console_scripts', 'asciinema')()
  File "C:\Python34\lib\site-packages\pkg_resources.py", line 353, in load_entry
_point
    return get_distribution(dist).load_entry_point(group, name)
  File "C:\Python34\lib\site-packages\pkg_resources.py", line 2302, in load_entr
y_point
    return ep.load()
  File "C:\Python34\lib\site-packages\pkg_resources.py", line 2029, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "C:\Python34\lib\site-packages\asciinema\__main__.py", line 4, in <module
>
    from .commands.builder import get_command
  File "C:\Python34\lib\site-packages\asciinema\commands\builder.py", line 4, in
 <module>
    from .record import RecordCommand
  File "C:\Python34\lib\site-packages\asciinema\commands\record.py", line 4, in
<module>
    from asciinema.recorder import Recorder
  File "C:\Python34\lib\site-packages\asciinema\recorder.py", line 5, in <module
>
    from .pty_recorder import PtyRecorder
  File "C:\Python34\lib\site-packages\asciinema\pty_recorder.py", line 2, in <mo
dule>
    import pty
  File "C:\Python34\lib\pty.py", line 11, in <module>
    import tty
  File "C:\Python34\lib\tty.py", line 5, in <module>
    from termios import *
ImportError: No module named 'termios'

2 个答案:

答案 0 :(得分:3)

在Windows世界中,由于POSIX规范,termios可通过Cygwin获得。

Mingw32不支持termios。

(我的urwid也有类似的问题,这也取决于termios)

答案 1 :(得分:1)

不支持Windows,因为它不具有伪终端,select()和其他unix功能。安装Cygwin也无济于事,因为它也不支持类似UNIX的伪终端。

来源:Windows not supportedGH-47处的GH-150

另请参阅:What is the Windows equivalent to the capabilities defined in sys/select.h and termios.h


解决方法