SoCo: SoCo erroring on import
- Raspberry Pi
- Python 3.9.2
Jun 27 05:31:30 raspberrypi python3[743]: import soco
Jun 27 05:31:30 raspberrypi python3[743]: File "/usr/local/lib/python3.9/dist-packages/soco/__init__.py", line 12, in <module>
Jun 27 05:31:30 raspberrypi python3[743]: from .core import SoCo
Jun 27 05:31:30 raspberrypi python3[743]: File "/usr/local/lib/python3.9/dist-packages/soco/core.py", line 55, in <module>
Jun 27 05:31:30 raspberrypi python3[743]: from .zonegroupstate import ZoneGroupState
Jun 27 05:31:30 raspberrypi python3[743]: File "/usr/local/lib/python3.9/dist-packages/soco/zonegroupstate.py", line 66, in <module>
Jun 27 05:31:30 raspberrypi python3[743]: from lxml import etree as LXML
Jun 27 05:31:30 raspberrypi python3[743]: ImportError: libxslt.so.1: cannot open shared object file: No such file or directory
My first thought is perhaps I’ve missed installing a new dependency?
Open to all suggestions please, as this has only just started happening as of today (27/06/2022).
Thank you!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (10 by maintainers)
Thanks for testing. That’s pulling down a pre-built binary wheel, as I’d expect.
Looking at the
lxml
installation instructions, there’s also a dependency on thelibxml2
andlibxslt
system libraries, if the pre-built binary is dynamically linked.The Windows binary is statically linked, so has no additional dependencies.
Based on the binary sizes, I think the ARM 64 binary (6.6MB) is statically linked:
whereas the ARM 32 binary (2.3MB) is dynamically linked:
For systems which obtain a dynamically linked
lxml
binary the required system libraries will need to be present or separately installed. There are notes on how to do this in thelxml
documentation.I’ll see what other reports of installation issues emerge, and I’ll update the release notes to reference this issue.