Closed calocedrus closed 4 years ago
It looks like you're running the library locally somehow (directly out of build/bdist.linux-armv7l), rather than installing it? Possibly building with one Python version and running with another? I'm not sure.
Under normal circumstances (ie: sudo pip install sgp30
) the smbus2
dependency would be satisfied by install_requires
:
Oh must note that sudo pip install sgp30
doesn't install our SGP30 library, which isn't even released to pypi yet. So you would have to run sudo python3 setup.py install
, which should pull in smbus2
Okay sudo pip install pimoroni-sgp30
should now install our library. Let me know if that still explodes!
Installing from the
install.sh
script, running thetest.py
example, gives:File "examples/test.py", line 5, in <module> sgp30 = SGP30() File "build/bdist.linux-armv7l/egg/sgp30/__init__.py", line 51, in __init__ ImportError: No module named smbus2
Either in python2 or 3. Shouldn't the install.sh script include installing smbus2? smbus2 can be installed via pip:sudo pip3 install smbus2
Then all is well.