PiSupply / PaPiRus

Resources for PaPiRus ePaper eInk displays
https://www.pi-supply.com/product/papirus-epaper-eink-screen-hat-for-raspberry-pi/
Other
346 stars 88 forks source link

ImportError: No module named smbus (and other package dependency issues) #109

Closed andymule closed 7 years ago

andymule commented 7 years ago

When using the latest Raspbian Lite installation (2017-04-10), after installing via the bash script and trying to run an example, this error is thrown: ImportError: No module named smbus This is easily resolved by running sudo apt install python-smbus However, this should probably be handled in your installation script.

shawaj commented 7 years ago

We don't really have the bandwidth to sorry anything other than standard Raspbian to be honest.

However I don't see any harm in adding that to the install process as if it's already installed it won't matter.

What do you think @francesco-vannini ?

francesco-vannini commented 7 years ago

The smbus is used for the RTC part. @tvoverbeek had to create a custom version of the smbus which is available here https://github.com/PiSupply/PaPiRus/tree/master/RTC-Hat-Examples/py-smbusf the standard one should not be used. There are detailed instructions as to what needs to be done to meet all that is needed for the RTC examples https://github.com/PiSupply/PaPiRus/tree/master/RTC-Hat-Examples Automating the configuration needed for the RTC is however something that we should integrate including of course the smbus part.

Thanks for pointing this out.

shawaj commented 7 years ago

@andymule - can you tell us which example you were trying to run?

shawaj commented 7 years ago

@francesco-vannini - looks like smbus standard version is also used.....

https://github.com/PiSupply/PaPiRus/blob/7fd84509ec15900aeb6018da9aea59c44f5b3595/papirus/lm75b.py

tvoverbeek commented 7 years ago

The RTC on the HAT is already claimed by the kernel-module. Therefore we need the smbusf (smbus-force) module to program the reset/GPIO output going to the pogo-pin. The LM75B is not claimed by the kernel, hence we can use of the standard smbus module for i2c access. Other examples also need additional python modules which might not be installed on raspbian-lite.

shawaj commented 7 years ago

@tvoverbeek shall we add all dependencies to the install process do you think? that way, when already installed the system just ignores and if not installed (like on Raspbian lite perhaps) it installs them?

tvoverbeek commented 7 years ago

Yes. We should review all examples for additional packages needed.

shawaj commented 7 years ago

Ok great, sounds like a good idea :-)

andymule commented 7 years ago

thanks guys, I LOVE MY PaPiRUS

shawaj commented 7 years ago

Pleasure, thanks for reporting this :-)

shawaj commented 7 years ago

@francesco-vannini did you test this on Raspbian lite and perhaps DietPi to ensure we have all required modules?

Can't think of any others but worth testing I guess