adafruit / Adafruit_CircuitPython_LSM6DS

CircuitPython helper library for the LSM6DS family of motion sensors from ST
MIT License
25 stars 21 forks source link

pypi version is broken #24

Closed walchko closed 4 years ago

walchko commented 4 years ago

Hello! When I updated to current version, I am unable to import adafruit_lsm6ds. However, if I uninstall it and load a previous version with pip install adafruit-circuitpython-lsm6ds==3.0.2, I can now import it. Am I missing something with version 4?

This fails for me on the current macOS and Ubuntu 20.04 using python 3.8.

FoamyGuy commented 4 years ago

@walchko the module was split apart into separate files I believe the import now needs to specify the type of hardware sensor that you are using. e.g.

from adafruit_lsm6ds.lsm6ds33 import LSM6DS33

See the updated scripts in the examples folder for the specific syntax of the other types of devices the library supports.

walchko commented 4 years ago

No, that doesn't work. You cannot import adafruit_lsm6ds ... it doesn't exist. I should still be able to do import adafruit_lsm6ds and get everything, but when I do it can't find it.

FoamyGuy commented 4 years ago

Try version 4.0.1

pip3 install adafruit-circuitpython-lsm6ds==4.0.1

That is the most recent version before the library was split into a directory I think. after installing that one I am able to import it successfully.

FoamyGuy commented 4 years ago

I think the setup.py file needs to be updated to use packages here:

https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS/blob/305c6583dd99b7584636e6d65248aaebcc71d89b/setup.py#L61

and it should fix this issue. @walchko do you want to make a PR to fix this for us? No problem if not we should be able to get it resolved soon.

walchko commented 4 years ago

sure ... tomorrow :smile:

walchko commented 4 years ago

done ... there are other small issues though:

FoamyGuy commented 4 years ago

Closing this for now. #28 has follow up questions about setup.py from above.