I'm trying to use the module 'smbus' on python3. I've downloaded it - when I try to download smbus, it says that smbus is up to date and installed. However, when I try to use it, it says the module is not found. I've found a similar problem with pip3. It's downloaded but pip is an unrecognized command. Thank you!
EDIT 1: I think this is because of a mix up of Python 2/3
EDIT 2: when I run
apt-cache search smbus, I get:
pi@raspberrypi ~ $ apt-cache search smbus python-smbus - Python bindings for Linux SMBus access through i2c-dev pypy-smbus-cffi - This Python module allows SMBus access through the I2C /dev python3-smbus - Python 3 bindings for Linux SMBus access through i2c-dev
EDIT 3: I downloaded smbus by:
sudo apt-get update sudo apt-get install -y python3-smbus