我正在尝试导入一个模块来控制语音 AIY 按钮中的 LED。我有套件的第 2 版。使用v2 指令和v1 指令,我ImportError
在尝试导入包时得到一个。v2 指令说运行from aiy.leds import Leds, Color
,v1 指令说使用from aiy.board import Board, Led
我是错误地尝试导入模块,还是完全错过了它?如果它丢失了,我可以下载必要的模块,还是我必须完全重新刷新图像?
pi@raspberrypi:/opt/aiy/projects-python/src $ python3 main.py
Importing packages...
Importing LED...
Traceback (most recent call last):
File "main.py", line 454, in <module>
from aiy.board import Board, Led
ImportError: No module named 'aiy.board'
pi@raspberrypi:/opt/aiy/projects-python/src $ sudo nano main.py
pi@raspberrypi:/opt/aiy/projects-python/src $ python3 main.py
Importing packages...
Importing LED...
Traceback (most recent call last):
File "main.py", line 458, in <module>
from aiy.leds import Leds, Color
ImportError: No module named 'aiy.leds'