Skip to content

No support for Python packages that rely on manylinux wheels newer than manylinux2014 #700

Closed

Description

@svet-b

Description:

Using sam build (without --use-container) and trying to install a recent version of Polars, such as 1.12.0, fails with "Could not find a version that satisfies the requirement ...". Only Polars versions up to 0.19.12 are listed as available.

This is because Polars stopped shipping wheels based on manylinux2014 (link), on the basis that it's outdated (and essentially EOL).

Meanwhile, at present sam build supports only manylinux up to manylinux2014 (aka manylinux_2_17) wheels, and no versions more recent than that (source). I'm experiencing this on ARM64, but it appears to be true for x86_64 also.

I haven't done a thorough search on how widespread of an issue this is, but there's at least one other similar report here: #674

Given that Python package maintainers are moving away from an outdated version of manylinux, it would be great for this toolchain to also support more recent versions.

I should note that using sam build --use-container does build successfully. But I'd like to avoid that since (a) it adds some weight to the build process, and (b) I'm running the build inside CodePipeline, which is not happy with me trying to spin up a container inside it.

Hopefully it's ok to not add further detail for now as I think the issue I'm describing is self-evident - but happy to attach some detailed logs/reproducers if actually helpful.

Activity

  1. added
    stage/needs-triage
    on Nov 4, 2024
  2. mndeveci commented on Nov 12, 2024

    @mndeveci
    Contributor

    Thanks for reporting this issue.

    If you build it with sam build --use-container, does running sam local invoke and deploying the function works as expected? If so, we need to attach this issue to the one above to make sure AWS Lambda Builders can support the newer manylinux versions that is supported by Lambda.

  3. added
    blocked/more-info-needed
    python
    and removed
    stage/needs-triage
    on Nov 12, 2024
  4. svet-b commented on Nov 13, 2024

    @svet-b
    Author

    Thank you for looking into this. Indeed, after building with --use-container, running sam local invoke works as expected.

  5. vicheey commented on Feb 17, 2025

    @vicheey
    Contributor

    Thank you for confirming. We are keeping this issue open for now to see if we have any reaction from community who face similar issue and will prioritize accordingly.

  6. stschulte commented on Mar 13, 2025

    @stschulte

    I saw similar issues trying to use rdkit which prevents using any newer versions. Since I am not using SAM, but use terraform for means of deployment, we use aws-lambda-builder directly to turn a python project to a ZIP file we can deploy to S3. This currently limits us in what depdendencies we can include in our projects.

    Is the platform a restriction of the lambda builder or is this a restriction of the runtime? I assumed that latest runtimes like python3.13 would also shop with a recent glibc?

  7. alesanfra commented on Jun 9, 2025

    @alesanfra
    Contributor

    Hi there,

    I'm Alessio from Verizon, and I'm experiencing the same issue as of today when trying to install numpy==2.3.0, which apparently requires manylinux_2_28.

    It would be great if there was an option to override the manylinux version through an environment variable or CLI option. Since the Python 3.12+ Lambda environment runs on AL2023, there shouldn't be any compatibility issues with using manylinux_2_28 with python3.12 and python3.13 runtimes.

    Thanks for considering this enhancement!

    Alessio

  8. valerena commented on Jul 8, 2025

    @valerena
    Contributor

    I'll add an update here, because there has been more info in the aws-sam-cli version of this GitHub issue. The last released version (1.55.0, included in SAM CLI 1.142.1) allowed aws-lambda-builders to consider manylinux_2_28 (and other versions up to 2_34) as compatible for purposes of building instead of just checking for a really old version like it was doing before. However, this mostly works when the environment where you're building is similar to the one you're building for.

    That means that when trying to build cross architecture, aws-lambda-builders still doesn't manage the new platform values correctly. More details about why this happens are described here: aws/aws-sam-cli#8101 (comment)

    We're currently in discussions about how and when we'll get this solved, and we'll post updates when we have more info.

  9. JonZeolla commented on Jul 21, 2025

    @JonZeolla

    @valerena was this fixed as of de307a9 and we're just awaiting a release, or is there more work planned?

    I'm tracking this one closely as it should fix a boat load of issues for me 😅

  10. valerena commented on Jul 21, 2025

    @valerena
    Contributor

    Just waiting for this to be released. First in aws-lambda-builders, which should happen soon , and then a SAM CLI release (if you use SAM CLI), which could take longer because there are more things to check over there.

  11. JonZeolla commented on Jul 22, 2025

    @JonZeolla

    @valerena thanks. Fwiw I used develop locally with a custom built samdev and it worked/fixed my cross-platform python 3.13 zip builds with numpy 2.3 (and other deps in similar scenarios)

  12. vicheey commented on Sep 13, 2025

    @vicheey
    Contributor

    The de307a9 was release in aws-lambda-builders v1.56.0 and this was already included in aws-sam-cli v1.144.0.

  13. plondino commented on Sep 25, 2025

    @plondino

    I am curious why this is restricted to only supporting python runtime is 3.12+ - I am trying to install confluent Kafka on python 3.11 and it is failing because it's manylinux_2_28: https://pypi.org/project/confluent-kafka/#confluent_kafka-2.11.1-cp311-cp311-manylinux_2_28_x86_64.whl

  14. alesanfra commented on Oct 5, 2025

    @alesanfra
    Contributor

    I am curious why this is restricted to only supporting python runtime is 3.12+ - I am trying to install confluent Kafka on python 3.11 and it is failing because it's manylinux_2_28: https://pypi.org/project/confluent-kafka/#confluent_kafka-2.11.1-cp311-cp311-manylinux_2_28_x86_64.whl

    As you can see here, the Python 3.11 runtime runs on Amazon Linux 2, which ships with glibc 2.26. This means it cannot run manylinux_2_28 binaries, as they require glibc 2.28 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildarea/workflow/python_pipblocked/more-info-neededpython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions