I recommend using a virtualenv:
$ python -m venv venv
# ... assuming that 'python' points to a Python 3.7 installation
Then activate it:
$ source venv/bin/activate
Next, install the requirements:
$ pip install -r requirements.txt
Then run localstack:
$ docker run -t -i -m 1g --rm \
-e "SERVICES=s3,dynamodb,kinesis,sqs,sns" \
-e "DEBUG=1" \
-p "4566-4578:4566-4578" \
--name localstack localstack/localstack:0.11.3
Then just run the script:
$ python sqs_backoff.py