ImportError: No module named Adafruit_BBIO.GPIO
Adafruit_BBIO 是一个 Python 库,用于在运行 Debian 的 BeagleBone 上进行 GPIO、PWM、ADC 等硬件访问。推荐使用官方 BeagleBoard.org 的 Debian 10.3 “Buster” IoT 镜像(内核 4.19.x-ti)。该库支持 Linux 内核 3.8 到 4.19,并建议使用 Python 3。安装可以通过简单的 apt-get 命令或手动从 GitHub 克隆并安装。要升级到最新版本,可以使用 pip3。
Adafruit BBIO is an API to enable GPIO, PWM, ADC, UART, SPI and eQEP (Quadrature Encoder) hardware access from Python applications running on the Beaglebone.
It is recommended to use an official BeagleBoard.org Debian image.
Currently recommended image: Debian 10.3 “Buster” IoT (2020-04-06) (default kernel is 4.19.x-ti)
Adafruit_BBIO supports Linux kernels 3.8 through 4.19.
New versions of Adafruit_BBIO may break backwards compatibility. Please read the changelog.
It is recommended to use Python 3.
Installation on Debian
Note: Follow the instructions on BeagleBoard.org to get connected to the Internet.
Easiest:
sudo apt-get update
sudo apt-get install build-essential python3-dev python3-pip -y
sudo pip3 install Adafruit_BBIO
Manual:
sudo apt-get update
sudo apt-get install build-essential python3-dev python3-pip -y
git clone git://github.com/adafruit/adafruit-beaglebone-io-python.git
cd adafruit-beaglebone-io-python
sudo python3 setup.py install
Upgrade Adafruit_BBIO to latest version on PyPI:
sudo pip3 install --upgrade Adafruit_BBIO