kplindegaard / smbus2

A drop-in replacement for smbus-cffi/smbus-python in pure Python
MIT License
243 stars 68 forks source link

ImportError: cannot import name 'ic_msg' #34

Closed afan09 closed 5 years ago

afan09 commented 5 years ago

i just did sudo python3 setup.py install then when i try : from smbus2 import SMBus, ic_msg

it give me an error like that.. `ImportError Traceback (most recent call last)

in ----> 1 from smbus2 import SMBus, ic_msg 2 import pydoc ImportError: cannot import name 'ic_msg'`
kplindegaard commented 5 years ago

Given your import statement, that's the correct behavior. There is no ic_msg in the lib. Now, there is a class called i2c_msg, ref. example 5 in README.md.