Код: Выделить всё
mkdir lambda_layers
cd lambda_layers
mkdir python
cd python
pip install gitpython -t ./
cd .. && zip -r python_modules.zip .
code> это дало мне следующую ошибку:
Код: Выделить всё
[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()
All git commands will error until this is rectified.
This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception
Example:
export GIT_PYTHON_REFRESH=quiet
Подробнее здесь: https://stackoverflow.com/questions/763 ... a-function
Мобильная версия