没有名为RPI的模块错误即使已安装

问题描述

我最近在我的pycharm库和linux操作系统中都安装了RPi.GPIO,但是好像我每次运行命令时,都会收到一条错误消息:

回溯(最近通话最近): 在第2行的“ /home/jpxso/PycharmProjects/pythonProject/venv/Sweep.py”文件中 将RPi.GPIO导入为GPIO ModuleNotFoundError:没有名为“ RPi”的模块

解决方法

尝试使用Operation not permitted。如果这不起作用,请尝试在控制台中使用pip install RPi.GIPO函数。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...