无法获取缺少的 termios 模块.我如何正确获取它? [英] Unable to get missing termios module. How do I properly get it?

查看:209
本文介绍了无法获取缺少的 termios 模块.我如何正确获取它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试 pip install termios 模块,它给了我以下错误

I am attempting to pip install termios module and it gives me the following error

找不到满足 termios 要求的版本(来自版本:)找不到与 termios 匹配的分布

Could not find a version that satisfies the requirement termios (from versions: ) No matching distribution found for termios

我已经在 Python 2.7 和 3.5 上尝试过这个.在 linux 上.

I have attempted this on Python 2.7 and 3.5. On linux.

推荐答案

termiosPython 标准库,这意味着它是 Python 自带的.它为底层的POSIX终端调用提供了一个接口OS,这意味着它仅适用于 POSIX 平台.所以...

termios is part of the Python Standard Library, which means it comes with Python. It provides an interface to the POSIX terminal calls of the underlying OS, which means it only applies on POSIX platforms. So...

  1. 如果您尝试在 Windows 上安装它,它将无法运行,因为 Windows 不是 POSIX 平台.
  2. 如果您尝试在 Linuxma​​cos 或其他 POSIX 平台上安装它,则没有必要.只需在您的 Python 脚本中 import termios.如果失败,那么您的 Python 安装已损坏,您应该重新安装 Python.
  1. If you're trying to install it on Windows, it will not work because Windows is not a POSIX platform.
  2. If you're trying to install it on Linux, macos, or other POSIX platforms, then there's no need. Just import termios in your Python script. If that fails, then your Python install is broken and you should reinstall Python.

这篇关于无法获取缺少的 termios 模块.我如何正确获取它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆