Skip to content
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

libexpat not packaged with linux wheels? #136

Closed
mathause opened this issue Nov 12, 2024 · 6 comments
Closed

libexpat not packaged with linux wheels? #136

mathause opened this issue Nov 12, 2024 · 6 comments

Comments

@mathause
Copy link

It looks like libexpat is not packaged in linux wheels. However, from build_expat I would expect it to be - or do I interpret the IS_OSX flag wrong?

function build_expat {

Why is that relevant? Apparently some linux docker images stopped shipping libexpat (see docker-library/python#984) so importing rasterio fails in these containers.

@vincentsarago
Copy link
Member

I also just experienced it with AWS Lambda python 3.12, but I've not yet be able to create a simple reproductible example developmentseed/titiler-md-demo#3

@AdelImamovic
Copy link

AdelImamovic commented Nov 12, 2024

Code to reproduce the issue:

podman pull docker.io/library/python:3.10-slim # same with py311
podman run python:3.10-slim sh -c "pip install rasterio && python -c 'import rasterio'"

@sgillies
Copy link
Member

Thanks for the report @mathause ! I don't think I'll do anything about it just for these particular images.

Keep in mind that the rasterio wheels are mostly for testing purposes. I don't put them into production because they lack features and some of the library versions are a little old.

@mathause
Copy link
Author

Thanks for your answer. So what's the recommendation? Using conda? Or building locally?

It's obviously fair enough that the wheels should not be used for production - but where could I see that? Is that in the documentation? (And just as a comment: it's quite the recommendation for the individual user to know which package on the stack is usable and which is not. Especially if it had recent versions on pypi.)

@vincentsarago
Copy link
Member

this was also reported in rasterio/rasterio#3257 (reply in thread) and is linked to docker-library/python#989

@mathause the easiest thing to do is to install libexpat

apt update && apt install -y libexpat1

@sgillies
Copy link
Member

Thanks @vincentsarago ! I'll close this as it is all in the hands of the slim image maintainers.

It's not surprising that rasterio wheels users saw this first. Rasterio's C dependencies are probably the most numerous of any publicly published wheels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants