简体   繁体   English

错误:ModuleNotFoundError:没有名为“termios”的模块

[英]Error: ModuleNotFoundError: No module named 'termios'

from google.colab import drive
drive.mount('/content/gdrive') 

This is the code I have written这是我写的代码

Are you on windows by any chance?你在 windows 上吗? If so, you need to use a Unix based system since Termios is only on Unix and not windows according to this source如果是这样,您需要使用基于 Unix 的系统,因为根据此来源,Termios 仅在 Unix 而不是 windows 上

Since termios is an inbuilt python library, If you are on a Unix-based system, just:由于 termios 是一个内置的 python 库,如果您使用的是基于 Unix 的系统,只需:

import termios

If this does not work, your python installation is likely broken and you will need to reinstall Python如果这不起作用,您的 python 安装可能已损坏,您需要重新安装 Python

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM