Adafruit setup tutorial can be found here
For Raspberry Pi
sudo apt-get update
sudo apt-get install build-essential python-dev python-pip
sudo pip install RPi.GPIO
sudo apt-get install python-imaging python-smbus
Get the Python lib
sudo apt-get install git
git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
cd Adafruit_Python_SSD1306
sudo python setup.py install
sudo
is required to use GPIO.
If you have a 4-pin I2C breakout: connect SDA, SCL, GND to their corresponding Raspberry Pi pins; VCC to 3.3V. Otherwise, follow the wiring examples here.
This worked perfectly! Thanks for writing this, it helps a lot.