你试试:sudoapt-getinstallpython3-rpi.gpioRaspbian中安装了两个Python版本,分别是2.7.3和3.2.2。Python2.x的安装包会一python为前缀,而Python3.x的安装包回忆python3为前缀。Python2安装GPIO库需要输入命令:sudoapt-getinstallpython-rpi.gpioPython3安装GPIO库需要输入命令:sudoapt-getinstallpython3-rpi.gpio