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)

Most upvoted comments

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 the libxml2 and libxslt 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:

Using cached lxml-4.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl (6.6 MB)

whereas the ARM 32 binary (2.3MB) is dynamically linked:

Downloading https://www.piwheels.org/simple/lxml/lxml-4.9.0-cp37-cp37m-linux_armv7l.whl (2.3MB)

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 the lxml documentation.

I’ll see what other reports of installation issues emerge, and I’ll update the release notes to reference this issue.