Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: libexpat.so.1 with fiona>=1.10 #1480

Closed
soxofaan opened this issue Jan 9, 2025 · 1 comment
Closed

ImportError: libexpat.so.1 with fiona>=1.10 #1480

soxofaan opened this issue Jan 9, 2025 · 1 comment

Comments

@soxofaan
Copy link

soxofaan commented Jan 9, 2025

Importing fiona in a minimal docker container fails with 1.10

❯ docker run --rm -it python:3.11-slim-bookworm /bin/bash
...
root@c4ab4a8d0a92:/# python -m pip install fiona
...
Downloading fiona-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
...
Successfully installed attrs-24.3.0 certifi-2024.12.14 click-8.1.8 click-plugins-1.1.1 cligj-0.7.2 fiona-1.10.1
...
root@c4ab4a8d0a92:/# python -c "import fiona"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.11/site-packages/fiona/__init__.py", line 42, in <module>
    from fiona._env import (
ImportError: libexpat.so.1: cannot open shared object file: No such file or directory

Downgrading to <1.10 works without issue:

...
root@c4ab4a8d0a92:/# python -m pip install 'fiona<1.10'
...
Downloading fiona-1.9.6-cp311-cp311-manylinux2014_x86_64.whl (15.7 MB)
...
Successfully installed fiona-1.9.6 six-1.17.0
...
root@c4ab4a8d0a92:/# python -c "import fiona;print(fiona)"
<module 'fiona' from '/usr/local/lib/python3.11/site-packages/fiona/__init__.py'>
@soxofaan
Copy link
Author

soxofaan commented Jan 9, 2025

FYI, libexpat seems to be included in 1.9.6 wheel, but not in 1.10:

root@c4ab4a8d0a92:/# python -m pip install -U 'fiona==1.9.6'
root@c4ab4a8d0a92:/# find /usr/local/lib/ -name libexpat*
/usr/local/lib/python3.11/site-packages/fiona.libs/libexpat-fiona-7e7d8668.so.1.6.8

root@c4ab4a8d0a92:/# python -m pip install -U 'fiona==1.10.0'
root@c4ab4a8d0a92:/# find /usr/local/lib/ -name libexpat*
# no results

root@c4ab4a8d0a92:/# python -m pip install -U 'fiona==1.10.1'
root@c4ab4a8d0a92:/# find /usr/local/lib/ -name libexpat*
# no results

@Toblerity Toblerity locked and limited conversation to collaborators Jan 9, 2025
@sgillies sgillies converted this issue into discussion #1481 Jan 9, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant