问题描述
在运行asciinema时提示我缺少文件:ImportError:没有名为"termios"的模块.
本文介绍了asciinema缺少文件:ImportError:没有名为"termios"的模块的处理方法
$ asciinema rec
Traceback (most recent call last):
File "d:\python_3.8.1\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "d:\python_3.8.1\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "D:\Python_3.8.1\Scripts\asciinema.exe\__main__.py", line 5, in <module>
File "d:\python_3.8.1\lib\site-packages\asciinema\__init__.py", line 9, in <mo
dule>
import asciinema.recorder
File "d:\python_3.8.1\lib\site-packages\asciinema\recorder.py", line 5, in <mo
dule>
import asciinema.pty as pty
File "d:\python_3.8.1\lib\site-packages\asciinema\pty.py", line 6, in <module>
import pty
File "d:\python_3.8.1\lib\pty.py", line 11, in <module>
import tty
File "d:\python_3.8.1\lib\tty.py", line 5, in <module>
from termios import *
ModuleNotFoundError: No module named 'termios'
解决方案
不支持Windows,因为它不具有伪终端,select()和其他unix功能.安装Cygwin也无济于事,因为它也不支持类似UNIX的伪终端.
来源: Windows不支持 ,位于 GH-47 & GH-150
另请参阅: Windows等同于sys/select.h和termios.h 中定义的功能?
来源: Windows不支持 ,位于 GH-47 & GH-150
另请参阅: Windows等同于sys/select.h和termios.h 中定义的功能?
解决方法
您可以尝试 mattn/asciinema 分支(windows分支).
在 Docker容器 中运行它.
在asciinemarel ="nofollow noreferrer"> Ubuntu for Windows中的Bash终端
When running asciinema rec, asciinema.exe both from inside C:\Python34\Scripts which is the only place the pip command works in git bash.
在 Docker容器 中运行它.
在asciinemarel ="nofollow noreferrer"> Ubuntu for Windows中的Bash终端
When running asciinema rec, asciinema.exe both from inside C:\Python34\Scripts which is the only place the pip command works in git bash.