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

时间:2015-08-20 00:33:27

标签: python raspberry-pi

在遵循本教程时,我的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 - 现在它抛出了上述错误: - (

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

1 个答案:

答案 0 :(得分:0)

重新启动时,库可能已损坏。只需从Adafruit_Python_CharLCD目录运行以下命令就可以了。

sudo python setup.py install