Unable to get missing termios module. How do I properly get it?

烂漫一生 提交于 2020-11-29 09:32:12

问题


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

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

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


回答1:


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. 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.


来源:https://stackoverflow.com/questions/54394804/unable-to-get-missing-termios-module-how-do-i-properly-get-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!