Skip to content

Bug: Issues with building local dependencies for python3.11 runtimes #6481

@mndeveci

Description

@mndeveci

AWS SAM CLI's Native Linux ZIP distribution might be failing to build python3.11 local dependencies if local environment has Python 3.11.5 or greater versions. You might be affected by this issue if you are;

  • Using Native Linux ZIP distribution
  • Have an AWS Lambda function which uses python3.11 runtime which has local dependencies
  • Build environment has Python 3.11.5+ versions

AWS SAM CLI's Native Linux ZIP distribution is been built by PyInstaller tool. As of now, it is been built by Python 3.11.3 version.

With the Python 3.11.5 version, there was a backward incompatible change introduced in CPython which is causing failures during method calls if standard libraries are mixed (see here and here).

This is currently affecting external pip command calls to build Python 3.11 functions since PyInstaller adds the LD_LIBRARY_PATH into environment variables, which causes mixing standard python libraries. See their documentation for more details; https://pyinstaller.org/en/stable/runtime-information.html#ld-library-path-libpath-considerations.

We are currently working on the fix for the issue, as a workaround you might downgrade Python3.11 installation to 3.11.4 for now.

Thanks for your understanding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildsam build commandpythonPull requests that update Python codestage/waiting-for-releaseFix has been merged to develop and is waiting for a releasetype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions