This worked for me on a Raspi 3.
openhabian@openhab:~$ sudo apt-get update
openhabian@openhab:~$ sudo apt-get install i2c-tools libi2c-dev python-smbus
openhabian@openhab:~$ sudo vi /etc/modules
add these two lines:
i2c-dev
i2c-bcm2835 # this of for Raspi 3
openhabian@openhab:~$ sudo nano /boot/config.txt
add/uncomment these two lines:
dtparam=i1c_arm=on
dtparam=i2c1=on
openhabian@openhab:~$ sudo reboot
openhabian@openhab:~$ sudo i2cdetect -y 1