遵循 Adafruit 教程时 Raspberry Pi 上的 GPIO 错误

GPIO Error on Raspberry Pi when following Adafruit Tutorial

在学习本教程时我的 Raspberry Pi 遇到一个非常奇怪的问题...

https://learn.adafruit.com/adafruit-16x2-character-lcd-plus-keypad-for-raspberry-pi/usage

当我 运行 示例脚本时,出现以下错误:

pi@thethingbox ~/Adafruit_Python_CharLCD/examples $ sudo python char_lcd_plate.py
Traceback (most recent call last):
  File "char_lcd_plate.py", line 6, in <module>
    import Adafruit_CharLCD as LCD
  File "build/bdist.linux-armv6l/egg/Adafruit_CharLCD/__init__.py", line 1, in <module>
  File "build/bdist.linux-armv6l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py",line 23, in <module>
ImportError: No module named Adafruit_GPIO

它工作正常。但是当我重新启动时,我被迫 运行 fsck - 现在它抛出了上面的错误:-(

我试过删除目录并重新开始,但我遇到了同样的问题。

您重新启动时,库可能已损坏。只需从 Adafruit_Python_CharLCD 目录中 运行 下面的命令,你应该没问题。

sudo python setup.py install