python best way to handle version issues / install failures / lambda library failures

Ayush Singh
Mar 14, 2023

Use pyenv

  1. brew install pyenv
  2. follow steps accordingly :-
    pyenv versions
    pyenv install -v 3.8.9
    pyenv shell 3.8.9
  3. follow steps whatever come in middle

During install failures :-
Whenever warning comes for pip upgrade along with install failures, do pip upgrade first and try again

Lambda Library Failures :-

Some pip packages are os specific and may not actually run in lambda as in your local
Solution :- https://blog.ascendingdc.com/aws-lambda-runtime-compatibility-issue-on-native-library

--

--