I have Raspberry pi3 with 32gb Sd Card.
Linux Kernel=4.9.41-v7+ #1026.
Firmware=Aug 8 2017 12:01:57 Copyright 2012 Broadcom.
Python=3.6.2 (Build last week) using http://bohdan-danishevsky.blogspot.ca/2 ... y-pi-3.htm
Raspbian GNU/Linux 9 (stretch).
I use: sudo apt-get update then sudo apt-get upgrade
then sudo apt-get install python3-smbus
that write: Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-smbus is already the newest version (3.1.2-3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgrade
Everything works properly.
I have hooked-up a Chronodot (RTC) on i2c bus. When I use i2cset.... or i2cget.... in terminal,
it work normally.
I've been told that I can't use those command in a scrip. So I have a scrip
that have only one line: import smbus
In version 2.7.13
When i use: python chronodot.py it pass thru OK.
In version 3.6.2
When i use: python3.6 chronodot.py it print:
Traceback (most recent call last):
File "chronodotz.py", line 1, in <module>
ModuleNotFoundError: No module named 'smbus'
Could anyone tell me what is wrong. Thanks