The current Debian distribution includes the Adafruit_BBIO and PyBBIO libraries, both of which are extremely useful and commonly used on BBB to control the pins of your board with Python. We will work with these libraries in the next section.
If you're using the current Debian 7 Wheezy distribution or Debian 8 Jessie, you can skip to the next section. However, if you have some other version of an OS, here are the steps to install the two libraries.
Part One: Installing Adafruit _BBIO library. Perform the following steps:
Log in as the root user with this command:
$ sudo -i
Using the following command, ensure that you update your package list:
# apt-get update
Now, install the library's dependencies through the following command:
# apt-get install build-essential python-dev python-setuptools python-pip python-smbus -y