xtile/BH1750-Python

bus = smbus.SMBus(1) FileNotFoundError: [Errno 2] No such file or directory

Opened this issue · 2 comments

Hi,

I am having a problem. When I import smbus it is properly importing but with creating object of smbus it gives this error.

bus = smbus.SMBus(1)
FileNotFoundError: [Errno 2] No such file or directory

What can be the problem

Hi,

I had a similar issue using a Raspberry Pi 3B. The solution for me was, that you have to enable I2C under Raspberry Pi Config>Intrfaces.

@Assikurt94 solved my problem. Thanks!