balena-io-experimental / balena-pijuice

Project to use PiJuice with a Raspberry Pi
4 stars 2 forks source link

no module named smbus #1

Open enedrio opened 5 years ago

enedrio commented 5 years ago

Hey there,

I've installed your container in my balena project, but unfortunately it doesn't start correctly. I get the following error with traceback:

24.07.19 16:38:47 (+0200)  pijuice  Traceback (most recent call last):
24.07.19 16:38:47 (+0200)  pijuice    File "src/main.py", line 5, in <module>
24.07.19 16:38:47 (+0200)  pijuice      from pijuice import PiJuice
24.07.19 16:38:47 (+0200)  pijuice    File "/usr/lib/python3/dist-packages/pijuice.py", line 10, in <module>
24.07.19 16:38:47 (+0200)  pijuice      from smbus import SMBus
24.07.19 16:38:47 (+0200)  pijuice  ModuleNotFoundError: No module named 'smbus'

Steps to reproduce

  1. I cloned the repo.
  2. Copied the pijuice folder into my project.
  3. Included the build instruction in my docker-compose.yml. Stating the startup command explicitly via the command key.
  4. Uploaded the new version of the project to balena cloud.

Any help would be much appreciated. I would love to see this running. :)

Best, Eric

chrisys commented 5 years ago

Hey @enedrio is this still an issue for you? I just ran a test with this and it seemed to work OK. It would be interesting to know what device type you're using.

enedrio commented 4 years ago

Hey @chrisys , I believe it was either a raspberry pi 3 or an RPi 3 A+ I believe I will give it a shot in January again, to see how it goes. Right now my pijuice is not in reach to try this. Sorry

adamlarsonlee commented 4 years ago

I'm getting this well on a Rpi 4 B.

capzrfun commented 10 months ago

I am also getting this on the RPI4, seems the SMbus module does not import the same as it did with Python 3.5, but im running Python3.11 on my image, trying to figure out how to get Python3.5 to work on Balena