当运行asciinema rec
时,asciinema.exe
都来自C:\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'
最佳答案
不支持Windows,因为它不具有伪终端,select()
和其他unix功能。安装Cygwin也无济于事,因为它也不支持类似UNIX的伪终端。
资料来源:Windows not supported,位于GH-47和GH-150
另请参阅:What is the Windows equivalent to the capabilities defined in sys/select.h and termios.h
解决方法
mattn/asciinema
fork(windows
分支)。 asciinema
关于python - asciinema缺少文件: ImportError: No module named 'termios' ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22941571/